summaryrefslogtreecommitdiffstats
path: root/sysutils/whatpix/files
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-02-05 11:36:13 +0000
committeredwin <edwin@FreeBSD.org>2003-02-05 11:36:13 +0000
commit004c85cc9ce10d8e44ceb046ddcc0633ad04db66 (patch)
tree2ee14a6487d6ddac39edd14a4387b937ebaad9ea /sysutils/whatpix/files
parentd1668df45c4967ed17a544dd4f32dc2d29094bae (diff)
downloadFreeBSD-ports-004c85cc9ce10d8e44ceb046ddcc0633ad04db66.zip
FreeBSD-ports-004c85cc9ce10d8e44ceb046ddcc0633ad04db66.tar.gz
New port: whatpix
a perl apps to find, moves or deletes duplicate files. PR: ports/41480 Submitted by: Philippe CASIDY <pcasidy@casidy.com>
Diffstat (limited to 'sysutils/whatpix/files')
-rw-r--r--sysutils/whatpix/files/patch-whatpix53
1 files changed, 53 insertions, 0 deletions
diff --git a/sysutils/whatpix/files/patch-whatpix b/sysutils/whatpix/files/patch-whatpix
new file mode 100644
index 0000000..1e154e8
--- /dev/null
+++ b/sysutils/whatpix/files/patch-whatpix
@@ -0,0 +1,53 @@
+*** whatpix.ori Fri Aug 9 13:43:49 2002
+--- whatpix Fri Aug 9 13:44:49 2002
+***************
+*** 236,242 ****
+ print " ", $dir, "\n";
+
+ # Get list of subdirectories.
+! opendir(DIR, $dir) or die "Error: opendir() failed on $dir\n";
+ my @dirs = grep { -d "$dir/$_" } readdir(DIR);
+ closedir(DIR);
+
+--- 236,242 ----
+ print " ", $dir, "\n";
+
+ # Get list of subdirectories.
+! opendir(DIR, "$dir\0") or die "Error: opendir() failed on $dir\n";
+ my @dirs = grep { -d "$dir/$_" } readdir(DIR);
+ closedir(DIR);
+
+***************
+*** 246,252 ****
+ }
+
+ # Now do the files in this directory.
+! opendir(DIR, $dir) || die "Error: failed to open $dir: $!";
+ my @files = grep { -r "$dir/$_" && -s "$dir/$_" } readdir(DIR);
+ closedir(DIR);
+ my $digester = $usemd5 ? Digest::MD5->new() : Digest::SHA1->new();
+--- 246,252 ----
+ }
+
+ # Now do the files in this directory.
+! opendir(DIR, "$dir\0") || die "Error: failed to open $dir: $!";
+ my @files = grep { -r "$dir/$_" && -s "$dir/$_" } readdir(DIR);
+ closedir(DIR);
+ my $digester = $usemd5 ? Digest::MD5->new() : Digest::SHA1->new();
+***************
+*** 256,262 ****
+ my @vars = stat($filename) or die "Error: could not stat $filename\n";
+ my $size = $vars[7];
+ if ($size) {
+! open(FILE, $filename) or die "Error: could not open $filename\n";
+ binmode(FILE);
+ $digester->reset;
+ $digester->addfile(*FILE);
+--- 256,262 ----
+ my @vars = stat($filename) or die "Error: could not stat $filename\n";
+ my $size = $vars[7];
+ if ($size) {
+! open(FILE, "$filename\0") or die "Error: could not open $filename\n";
+ binmode(FILE);
+ $digester->reset;
+ $digester->addfile(*FILE);
OpenPOWER on IntegriCloud