Hi Scott, hi Henry,

Scott Stanton schrieb:
Ideally we'd hash the file contents, but that's going to be too slow to
do on every startup.  Checking the expected size is a good compromise.
It's a fast sanity check that should catch the most common problems.

exactly: hashing is not an option because of performance. I just applied the attached patch instead of your proposed one: (Just adding the -s)

Henry: Does this solve your problem? Can you try the PAR::Packer from Subversion (http://svn.openfoundry.org/par/PAR-Packer/trunk)?

Cheers,
Steffen

--- script/par.pl       2008-01-07 22:44:49.000000000 +0100
+++ par.pl      2008-01-07 22:44:44.000000000 +0100
@@ -696,8 +696,13 @@
             }x;
             my $extract_name = $1;
my $dest_name = File::Spec->catfile($ENV{PAR_TEMP}, $extract_name);
-            $member->extractToFileNamed($dest_name);
-            outs(qq(Extracting "$member_name" to "$dest_name"));
+            if (! -f $dest_name or -s _ != $member->uncompressedSize()) {
+                $member->extractToFileNamed($dest_name);
+                outs(qq(Extracting "$member_name" to "$dest_name"));
+            } else {
+                outs(qq(Skipping "$member_name" since it already exists
+at "$dest_name"));
+            }
         }
     }
     # }}}

Reply via email to