mirror of https://github.com/MidnightCommander/mc
Ticket #3122: xorriso iso9660 show only one depth
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
dee4d1101e
commit
272116b0a8
|
@ -37,14 +37,19 @@ xorriso_list() {
|
|||
if test -z "$XORRISO"; then
|
||||
return 1
|
||||
fi
|
||||
local dir attr ln usr gr sz dt1 dt2 dt3 nm len name
|
||||
dir="$2"
|
||||
$XORRISO -dev stdio:"$1" -cd "$dir" -lsl 2> /dev/null | @GREP@ "^[-d]" | \
|
||||
local dir attr ln usr gr sz dt1 dt2 dt3 nm len name lsl r
|
||||
dir="${2:-/}"
|
||||
lsl=$( $XORRISO -abort_on FATAL -dev stdio:"$1" -cd "$dir" -lsl 2> /dev/null )
|
||||
r=$?
|
||||
test $r -gt 0 && return $r
|
||||
|
||||
echo "$lsl" | @GREP@ "^[-d]" | \
|
||||
while read attr ln usr gr sz dt1 dt2 dt3 nm ; do
|
||||
len=$((${#nm} - 1))
|
||||
name=$(printf "$nm" | cut -c2-$len) # remove quotes
|
||||
if test $(printf "$nm" | cut -c1-2) != "d"; then
|
||||
printf "%s %s %s %s %s %s %s %s %s/%s\n" "$attr" "$ln" "$usr" "$gr" "$sz" "$dt1" "$dt2" "$dt3" "$dir" "$name"
|
||||
name=$(printf -- "$nm" | cut -c2-$len) # remove quotes
|
||||
|
||||
if test $(printf -- "$attr" | cut -c1-1) != "d"; then
|
||||
printf -- "%s %s %s %s %s %s %s %s %s/%s\n" "$attr" "$ln" "$usr" "$gr" "$sz" "$dt1" "$dt2" "$dt3" "$dir" "$name"
|
||||
else
|
||||
xorriso_list "$1" "$dir/$name"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue