mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Another contributed fix.
This commit is contained in:
parent
986c445029
commit
268ac1fc7f
@ -1,3 +1,7 @@
|
||||
2000-11-02 Matthew Seaman <m.seaman@inpharmatica.co.uk>
|
||||
|
||||
* util/rmold.pl: Various fixes.
|
||||
|
||||
2000-11-01 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||
|
||||
* configure.in: Check for size of long and long long.
|
||||
|
@ -31,10 +31,8 @@ if (@ARGV && ($ARGV[0] eq '-v')) {
|
||||
$verbose = 1;
|
||||
}
|
||||
|
||||
defined($dirs[0] = shift) || ($dirs[0] = '.');
|
||||
while (defined($_ = shift)) {
|
||||
@dirs = (@dirs, $_);
|
||||
}
|
||||
(@dirs = @ARGV) || push (@dirs,'.');
|
||||
|
||||
|
||||
foreach $_ (@dirs) {
|
||||
&procdir($_);
|
||||
@ -44,7 +42,7 @@ foreach $_ (@dirs) {
|
||||
|
||||
sub procdir
|
||||
{
|
||||
local($dir = $_[0]);
|
||||
local $dir = shift;
|
||||
local(@lcfiles, @lcdirs, %files, @fl);
|
||||
|
||||
print STDERR "Processing directory '$dir':\n" if $verbose;
|
||||
@ -55,17 +53,17 @@ sub procdir
|
||||
# Read local files and directories.
|
||||
foreach $_ (readdir(DH)) {
|
||||
/^(\.listing|\.\.?)$/ && next;
|
||||
if (-d "$dir/$_" || -l "$dir/$_") {
|
||||
@lcdirs = (@lcdirs, $_);
|
||||
lstat ("$dir/$_");
|
||||
if (-d _) {
|
||||
push (@lcdirs, $_);
|
||||
}
|
||||
else {
|
||||
@lcfiles = (@lcfiles, $_);
|
||||
push (@lcfiles, $_);
|
||||
}
|
||||
}
|
||||
closedir(DH);
|
||||
# Parse .listing
|
||||
if (open(FD, "<$dir/.listing")) {
|
||||
@files = ();
|
||||
while (<FD>)
|
||||
{
|
||||
# Weed out the line beginning with 'total'
|
||||
|
Loading…
Reference in New Issue
Block a user