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:
Slava Zanko 2010-02-15 14:40:28 +02:00
commit 111750d600

View File

@ -31,20 +31,16 @@ mcrarfs_list ()
$UNRAR v -c- "$1" | @AWK@ -v uid=`id -u` -v gid=`id -g` ' $UNRAR v -c- "$1" | @AWK@ -v uid=`id -u` -v gid=`id -g` '
BEGIN { flag=0 } BEGIN { flag=0 }
/^-------/ { flag++; if (flag > 1) exit 0; next } /^-------/ { flag++; if (flag > 1) exit 0; next }
{ flag==1 {
if (flag == 0) next str = substr($0, 2)
if ( !/ [0-9][0-9]:[0-9][0-9] /) str = $0 # there is no time spec in this line getline
else {
if (str ~ /^\^/)
str=substr(str, 2)
split($4, a, "-") split($4, a, "-")
if (index($6, "D") != 0) if (index($6, "D") != 0)
$6="drwxr-xr-x" $6="drwxr-xr-x"
else else
if (index($6, ".") != 0) if (index($6, ".") != 0)
$6="-rw-r--r--" $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
}
}' }'
} }