mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* extfs/apt.in, extfs/dpkg.in: Avoid stat on non-existing file.
This commit is contained in:
parent
47e32ea5a5
commit
1edcc92829
@ -1,3 +1,7 @@
|
||||
2002-12-24 Adam Byrtek <alpha@debian.org>
|
||||
|
||||
* extfs/apt.in, extfs/dpkg.in: Avoid stat on non-existing file.
|
||||
|
||||
2002-12-20 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* smbfs.c: Resurrect and use myumask for generated permissions.
|
||||
|
@ -93,10 +93,13 @@ sub fm
|
||||
|
||||
sub ls {
|
||||
my ($file,$path,$mode) = @_;
|
||||
my @stat = stat($file);
|
||||
# mode, nlink, uid, gid, size, mtime, filename
|
||||
printf "%s %d %d %d %d %s %s\n", $mode || ft($file).fm($stat[2] & 07777),
|
||||
$stat[3], $stat[4], $stat[5], $stat[7], bt($stat[9]), $path;
|
||||
|
||||
if (-f $file) {
|
||||
my @stat = stat(_);
|
||||
# mode, nlink, uid, gid, size, mtime, filename
|
||||
printf "%s %d %d %d %d %s %s\n", $mode || ft($file).fm($stat[2] & 07777),
|
||||
$stat[3], $stat[4], $stat[5], $stat[7], bt($stat[9]), $path;
|
||||
}
|
||||
}
|
||||
|
||||
$DATE=bt(time());
|
||||
@ -125,7 +128,7 @@ sub list
|
||||
print "-r-xr--r-- 1 root root $sz $DATE DIST-UPGRADE\n";
|
||||
|
||||
ls("/etc/apt/sources.list","sources.list");
|
||||
ls("/etc/apt/apt.conf","apt.conf");
|
||||
ls('/etc/apt/apt.conf','apt.conf') if (-f '/etc/apt/apt.conf');
|
||||
|
||||
print "drwxr-xr-x 1 root root 0 $DATE all\n";
|
||||
|
||||
|
@ -93,10 +93,13 @@ sub fm
|
||||
|
||||
sub ls {
|
||||
my ($file,$path,$mode) = @_;
|
||||
my @stat = stat($file);
|
||||
# mode, nlink, uid, gid, size, mtime, filename
|
||||
printf "%s %d %d %d %d %s %s\n", $mode || ft($file).fm($stat[2] & 07777),
|
||||
$stat[3], $stat[4], $stat[5], $stat[7], bt($stat[9]), $path;
|
||||
|
||||
if (-f $file) {
|
||||
my @stat = stat(_);
|
||||
# mode, nlink, uid, gid, size, mtime, filename
|
||||
printf "%s %d %d %d %d %s %s\n", $mode || ft($file).fm($stat[2] & 07777),
|
||||
$stat[3], $stat[4], $stat[5], $stat[7], bt($stat[9]), $path;
|
||||
}
|
||||
}
|
||||
|
||||
$DATE=bt(time());
|
||||
|
Loading…
Reference in New Issue
Block a user