mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
Ticket #3433: extfs/uzip: adjust abnormal directory permission.
unzip 6.0 source reveal that unzip depends on filename and less on given zip object attribute. zipinfo can show something like Unix file attributes (177777 octal): ?rwsrwsrwt but unzip handle this object as directory if filename ended on '/'. In this case adjust permission string for reasonable extfs handling for all other cases uzip remain conservative and relay on proper permission. Signed-off-by: Andreas Mohr <and@gmx.li> Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
27c4c474a7
commit
2e04dfd8f6
@ -341,6 +341,10 @@ sub print_file {
|
||||
if ($platform ne 'unx') {
|
||||
$perms = ($filename =~ /\/$/ ? 'drwxr-xr-x' : '-rw-r--r--');
|
||||
}
|
||||
# adjust abnormal perms on directory
|
||||
if ($platform eq 'unx' && $filename =~ /\/$/ && $perms =~ /^\?(.*)$/) {
|
||||
$perms = 'd'.$1;
|
||||
}
|
||||
printf "%-10s 1 %-8d %-8d %8s %s/%s/%s %s:%s:%s %s", $perms, $<,
|
||||
$(, $realsize, $mon, $day, $year, $hours, $mins, $secs, $filename;
|
||||
if ($platform eq 'unx' && $perms =~ /^l/) {
|
||||
|
Loading…
Reference in New Issue
Block a user