ignore 100000 permissions for ghost files
This commit is contained in:
parent
8685e26913
commit
86e5051fdf
@ -83,20 +83,24 @@ while(<FL>) {
|
|||||||
$lnk = $2;
|
$lnk = $2;
|
||||||
}
|
}
|
||||||
next unless /^(\d+ (\d+) \S+) (.*\/)(.*?)$/;
|
next unless /^(\d+ (\d+) \S+) (.*\/)(.*?)$/;
|
||||||
|
my $perms = $1;
|
||||||
my $n = $dirs{$3};
|
my $n = $dirs{$3};
|
||||||
if (!defined($n)) {
|
if (!defined($n)) {
|
||||||
$n = @dirs;
|
$n = @dirs;
|
||||||
$dirs{$3} = $n;
|
$dirs{$3} = $n;
|
||||||
$dirs[$n] = $3;
|
$dirs[$n] = $3;
|
||||||
}
|
}
|
||||||
# ignore link targets of ghosts
|
# ignore link targets and permissions of ghosts
|
||||||
$lnk = '' if $lnk && (oct($2) & 0100) != 0;
|
if (oct($2) & 0100) != 0) {
|
||||||
my $m = $modes{"$1$lnk"};
|
$lnk = '' if $lnk;
|
||||||
|
$perms ~= s/^100000/100644/;
|
||||||
|
}
|
||||||
|
my $m = $modes{"$perms$lnk"};
|
||||||
if (!defined($m)) {
|
if (!defined($m)) {
|
||||||
$m = @modes;
|
$m = @modes;
|
||||||
$modes{"$1$lnk"} = $m;
|
$modes{"$perms$lnk"} = $m;
|
||||||
$modes[$m] = "$1$lnk";
|
$modes[$m] = "$perms$lnk";
|
||||||
$modes_type[$m] = oct($1) & 07770000;
|
$modes_type[$m] = oct($perms) & 07770000;
|
||||||
$modes_ghost[$m] = oct($2) & 0100;
|
$modes_ghost[$m] = oct($2) & 0100;
|
||||||
}
|
}
|
||||||
my $f = "$n/$4";
|
my $f = "$n/$4";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user