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

File mc-extfs-iso9660-xorriso.3.patch, 1.1 KB (added by dnh, 8 years ago)

mc-extfs-iso9660-xorriso.3.patch

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

    old new  
    3737    if test -z "$XORRISO"; then 
    3838        return 1 
    3939    fi 
    40     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]" | \ 
     40    local dir attr ln usr gr sz dt1 dt2 dt3 nm len name lsl r 
     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" | @GREP@ "^[-d]" | \ 
    4346    while read attr ln usr gr sz dt1 dt2 dt3 nm ; do 
    4447        len=$((${#nm} - 1)) 
    4548        name=$(printf "$nm" | cut -c2-$len)  # remove quotes 
    4649        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" 
     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