summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-09-23 10:04:16 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-09-23 10:04:16 (EDT)
commit874cafcd1d826d03066055b80c7900cae706f9c8 (patch)
treecfb71094b2275ccd5c5aff2e71b772ca21c1f1d2
parent90d425f646cc30e880627e7168c834a7640ef65d (diff)
downloadssic-874cafcd1d826d03066055b80c7900cae706f9c8.zip
ssic-874cafcd1d826d03066055b80c7900cae706f9c8.tar.gz
ssic-874cafcd1d826d03066055b80c7900cae706f9c8.tar.bz2
Only rename output file if it's not "-".
-rwxr-xr-xsrc/ssic.pl7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ssic.pl b/src/ssic.pl
index ba8b184..81bb50d 100755
--- a/src/ssic.pl
+++ b/src/ssic.pl
@@ -173,10 +173,9 @@ sub compile
}
if ($output ne "-") {
close($output_fh);
- }
-
- if (not rename($output . "~", $output)) {
- error(4, "%s: %s\n", $output, $!);
+ if (not rename($output . "~", $output)) {
+ error(4, "%s: %s\n", $output, $!);
+ }
}
}