fixed ext if no compression was selected
authorHeiko Schlittermann (DTELE) <hs@schlittermann.de>
Thu, 28 Jul 2011 12:17:45 +0200
changeset 24 c64604030f4c
parent 23 fa052441e5c2
child 25 94a50c69de28
fixed ext if no compression was selected
bin/imager
--- a/bin/imager	Thu Jul 28 12:15:16 2011 +0200
+++ b/bin/imager	Thu Jul 28 12:17:45 2011 +0200
@@ -116,10 +116,10 @@
     $SIG{ALRM}->();
 
     while (my $buffer = <$in>) {
-        my ($file, $ext, $cs);
-        $file = $cs = md5_hex($buffer);
-        $file =~ s/(?<fn>(?<prefix>...).*)/$+{prefix}\/$+{fn}/g;
-        $ext = ".gz" if $o{compress};
+	my ($file, $ext, $cs);
+	$file = $cs = md5_hex($buffer);
+	$file =~ s/(?<fn>(?<prefix>...).*)/$+{prefix}\/$+{fn}/g;
+	$ext = $o{compress} ? ".gz" : "";
 
         # the extension we do not put into the index
         my $log = sprintf "%12d %s %s" => ($. - 1), $cs, $file;