mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-09 13:02:01 +03:00
Merge branch '2029_error_in_urar.in'
* 2029_error_in_urar.in: urar.in: fixed work with filenames begining with spaces. Ticket #2029: Error in supporting rar-archives
This commit is contained in:
commit
111750d600
@ -31,20 +31,16 @@ mcrarfs_list ()
|
||||
$UNRAR v -c- "$1" | @AWK@ -v uid=`id -u` -v gid=`id -g` '
|
||||
BEGIN { flag=0 }
|
||||
/^-------/ { flag++; if (flag > 1) exit 0; next }
|
||||
{
|
||||
if (flag == 0) next
|
||||
if ( !/ [0-9][0-9]:[0-9][0-9] /) str = $0 # there is no time spec in this line
|
||||
else {
|
||||
if (str ~ /^\^/)
|
||||
str=substr(str, 2)
|
||||
flag==1 {
|
||||
str = substr($0, 2)
|
||||
getline
|
||||
split($4, a, "-")
|
||||
if (index($6, "D") != 0)
|
||||
$6="drwxr-xr-x"
|
||||
else
|
||||
if (index($6, ".") != 0)
|
||||
$6="-rw-r--r--"
|
||||
printf "%s 1 %s %s %d %02d/%02d/%02d %s %s\n", $6, uid, gid, $1, a[2], a[1], a[3], $5, str
|
||||
}
|
||||
printf "%s 1 %s %s %d %02d/%02d/%02d %s ./%s\n", $6, uid, gid, $1, a[2], a[1], a[3], $5, str
|
||||
}'
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user