mirror of https://github.com/MidnightCommander/mc
Merge branch '3122_xorriso_one_depth'
* 3122_xorriso_one_depth: Ticket #3122: xorriso iso9660 show only one depth
This commit is contained in:
commit
8ee4732bd5
|
@ -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