47 |
|
my $self=shift; |
48 |
|
my ($path) = @_; |
49 |
|
opendir (DIR, $path) || die "$path: cannot read: $!\n"; |
50 |
< |
# Skip .admin subdirectories too. |
50 |
> |
# Skip .admin and CVS subdirectories too. |
51 |
|
# Also skip files that look like backup files or files being modified with emacs: |
52 |
|
my @items = map { "$path/$_" } grep ( |
53 |
< |
$_ ne "." && $_ ne ".." && |
53 |
> |
$_ ne "." && $_ ne ".." && $_ ne "CVS" && |
54 |
|
$_ ne ".admin" && $_ !~ m|\.#*|, |
55 |
|
readdir(DIR) |
56 |
|
); |
82 |
|
# non-directories unless $dofiles is set. Considering only directories is |
83 |
|
# dramatically faster. |
84 |
|
next if ($path =~ /\.admin/); # skip .admin dirs |
85 |
+ |
next if ($path =~ /.*CVS/); |
86 |
|
|
87 |
|
# NB: We stat each path only once ever. The special "_" file handle uses |
88 |
|
# the results from the last stat we've made. See man perlfunc/stat. |