summaryrefslogtreecommitdiff
path: root/vidir
diff options
context:
space:
mode:
authorjoeyh <joeyh>2006-05-27 23:18:29 +0000
committerjoeyh <joeyh>2006-05-27 23:18:29 +0000
commit82a9b595bbf3e600d213ad3517e3fa2c153ea9e8 (patch)
tree4e032e5039e11657adbd49d30cf2a64bb5fbb1f0 /vidir
parent68088da67528e6db63175305776e288d33755646 (diff)
downloadmoreutils-82a9b595bbf3e600d213ad3517e3fa2c153ea9e8.tar.gz
releasing version 0.110.11
Diffstat (limited to 'vidir')
-rwxr-xr-xvidir4
1 files changed, 2 insertions, 2 deletions
diff --git a/vidir b/vidir
index 7082162..037dd5a 100755
--- a/vidir
+++ b/vidir
@@ -78,7 +78,7 @@ foreach my $item (@ARGV) {
}
elsif (-d $item) {
opendir(DIR, $item) || die "$0: cannot read $item: $!\n";
- push @dir, sort readdir(DIR);
+ push @dir, map { "$item/$_" } sort readdir(DIR);
closedir DIR;
}
else {
@@ -92,7 +92,7 @@ open (OUT, ">".$tmp->filename) || die "$0: cannot write ".$tmp->filename.": $!\n
my %item;
my $c=0;
foreach (@dir) {
- next if $_ eq '.' || $_ eq '..';
+ next if /(.*\/)?\.$/ || /(.*\/)?\.\.$/;
$item{++$c}=$_;
print OUT "$c.\t$_\n";
}