summaryrefslogtreecommitdiff
path: root/fixpaths
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2000-11-08 01:07:51 +0000
committerBen Lindstrom <mouring@eviladmin.org>2000-11-08 01:07:51 +0000
commitdbcea870630e6e6cedc6937d33da4e2e4c6d5390 (patch)
treea059a45f4b239ebf8d74aee385eae05f98dad530 /fixpaths
parent89ef41a7848612af76b477b9018d178e38edb415 (diff)
- (bal) fixpaths fixed to stop it from quitely failing. Patch by
Mark D. Roth <roth@feep.net>
Diffstat (limited to 'fixpaths')
-rwxr-xr-xfixpaths15
1 files changed, 7 insertions, 8 deletions
diff --git a/fixpaths b/fixpaths
index 4badd988..edd9e486 100755
--- a/fixpaths
+++ b/fixpaths
@@ -37,14 +37,13 @@ for $f (@ARGV) {
$of = $2.".$ext";
open(IN, "<$f") || die ("$0: input file $f missing!\n");
- if (open(OUT, ">$of")) {
- while (<IN>) {
- for $s (keys(%def)) {
- s#$s#$def{$s}#;
- } # for $s
- print OUT;
- } # while <IN>
- } # if (outfile open)
+ open(OUT, ">$of") || die ("$0: cannot create output file $of: $!\n");
+ while (<IN>) {
+ for $s (keys(%def)) {
+ s#$s#$def{$s}#;
+ } # for $s
+ print OUT;
+ } # while <IN>
} # for $f
exit 0;