Ticket #2029: Error in supporting rar-archives

Contents of rar-archives with filenames contained / \d\d:\d\d / are not listed correctly.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Serhiy Storchaka 2010-02-15 13:06:42 +02:00 committed by Slava Zanko
parent 533edd084a
commit 786e6f548e

View File

@ -31,12 +31,9 @@ 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"
@ -44,7 +41,6 @@ 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
}
}'
}