mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Ticket #2471: isoinfo adds ";1" to the end of file name when Joliet w/o Rock Ridge is used.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
f11a7290cc
commit
3293c5b237
@ -24,6 +24,12 @@ test_iso () {
|
||||
fi
|
||||
ISOINFO="isoinfo -R"
|
||||
isoinfo -d -i "$1" 2>/dev/null | @GREP@ "UCS level 1\|NO Joliet" > /dev/null || ISOINFO="$ISOINFO $JOLIET_OPT"
|
||||
|
||||
if [ `isoinfo -d -i "$1" 2>/dev/null | @GREP@ "Joliet with UCS level 3 found" | wc -l` == 1 ] ; then
|
||||
if [ `isoinfo -d -i "$1" 2>/dev/null | @GREP@ "NO Rock Ridge" | wc -l` == 1 ] ; then
|
||||
SEMICOLON="YES"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
mcisofs_list () {
|
||||
@ -38,7 +44,7 @@ case "$1" in
|
||||
*) MYCAT="cat";;
|
||||
esac
|
||||
|
||||
$ISOINFO -l -i "$1" | @AWK@ '
|
||||
$ISOINFO -l -i "$1" 2>/dev/null | @AWK@ -v SEMICOLON=$SEMICOLON '
|
||||
BEGIN {
|
||||
dir="";
|
||||
# Pattern to match 8 first fields.
|
||||
@ -60,6 +66,8 @@ BEGIN {
|
||||
sub(irx, "", name)
|
||||
sub("^---------- 0 0 0", "-r--r--r-- 1 root root", attr)
|
||||
sub(" $", "", name)
|
||||
# for Joliet UCS level 3
|
||||
if (SEMICOLON = "YES") sub(";1$", "", name);
|
||||
## sub(";[0-9]+$", "", name) ## would break copyout
|
||||
# skip . and ..
|
||||
if (name ~ /^\.\.?/) next;
|
||||
@ -68,7 +76,11 @@ BEGIN {
|
||||
}
|
||||
|
||||
mcisofs_copyout () {
|
||||
$ISOINFO -i "$1" -x "/$2" > "$3"
|
||||
if [ "x$SEMICOLON" == "xYES" ]; then
|
||||
$ISOINFO -i "$1" -x "/$2;1" 2>/dev/null > "$3"
|
||||
else
|
||||
$ISOINFO -i "$1" -x "/$2" 2>/dev/null > "$3"
|
||||
fi
|
||||
}
|
||||
|
||||
LC_ALL=C
|
||||
|
Loading…
Reference in New Issue
Block a user