Ticket #3122: mc-extfs-iso9660-xorriso.patch

File mc-extfs-iso9660-xorriso.patch, 1.2 KB (added by dnh, 9 years ago)

holbru's patch is a bit incomplete. At least I found some more problems, esp. with DVD (UDF) images ... This patch falls back on isoinfo.

  • mc-4.8.11/src/vfs/extfs/helpers/iso9660.in

    old new  
    3838        return 1 
    3939    fi 
    4040    local dir attr ln usr gr sz dt1 dt2 dt3 nm len name 
    41     dir="$2" 
    42     $XORRISO -dev stdio:"$1" -cd "$dir" -lsl 2> /dev/null | @GREP@ "^[-d]" | \ 
     41    dir="${2:-/}" 
     42    lsl=$( $XORRISO -abort_on FATAL -dev stdio:"$1" -cd "$dir" -lsl 2> /dev/null ) 
     43    r=$? 
     44    test $r -gt 0 && return $r 
     45    echo "$lsl" | /usr/bin/grep "^[-d]" | \ 
    4346    while read attr ln usr gr sz dt1 dt2 dt3 nm ; do 
    4447        len=$((${#nm} - 1)) 
    45         name=$(printf "$nm" | cut -c2-$len)  # remove quotes 
    46         if test $(printf "$nm" | cut -c1-2) != "d"; then 
    47             printf "%s %s %s %s %s %s %s %s %s/%s\n" "$attr" "$ln" "$usr" "$gr" "$sz" "$dt1" "$dt2" "$dt3" "$dir" "$name" 
     48        name=$(printf -- '%s' "$nm" | cut -c2-$len)  # remove quotes 
     49        if test $(printf -- '%s' "$attr" | cut -c1) != "d"; then 
     50            printf -- "%s %s %s %s %s %s %s %s %s/%s\n" "$attr" "$ln" "$usr" "$gr" "$sz" "$dt1" "$dt2" "$dt3" "$dir" "$name" 
    4851        else 
    4952            xorriso_list "$1" "$dir/$name" 
    5053        fi