aboutsummaryrefslogtreecommitdiffstats
path: root/compress_files
diff options
context:
space:
mode:
Diffstat (limited to 'compress_files')
-rwxr-xr-xcompress_files11
1 files changed, 6 insertions, 5 deletions
diff --git a/compress_files b/compress_files
index 8fc5a1b..0e7beda 100755
--- a/compress_files
+++ b/compress_files
@@ -160,12 +160,13 @@ sub xargs {
# Check if a file is a .so man page, for use by File::Find.
sub find_so_man() {
- local $_ = $_;
+ # skip symlinks
+ return if -l $_;
+ # skip directories
+ return if -d $_;
# The -s test is becuase a .so file tends to be small. We don't want
# to open every man page. 1024 is arbitrary.
- if (! -f $_ || -s $_ > 1024) {
- return;
- }
+ return if -s $_ > 1024;
# skip excluded files
return if $File::Find::name =~ $exclude_pattern;
@@ -183,7 +184,7 @@ sub find_so_man() {
$solink = "../$solink";
}
- push @sofiles, "$File::Find::dir/$_";
+ push @sofiles, $File::Find::name;
push @sodests, $solink;
}
}