Ticket #2471: mc-4.7.0.10-iso9660-semicolon.patch
File mc-4.7.0.10-iso9660-semicolon.patch, 1.3 KB (added by asy, 14 years ago) |
---|
-
lib/vfs/mc-vfs/extfs/iso9660.in
a b 24 24 fi 25 25 ISOINFO="isoinfo -R" 26 26 isoinfo -d -i "$1" 2>/dev/null | @GREP@ "UCS level 1\|NO Joliet" > /dev/null || ISOINFO="$ISOINFO $JOLIET_OPT" 27 28 if [ `isoinfo -d -i "$1" 2>/dev/null | @GREP@ "Joliet with UCS level 3 found" | wc -l` == 1 ] ; then 29 if [ `isoinfo -d -i "$1" 2>/dev/null | @GREP@ "NO Rock Ridge" | wc -l` == 1 ] ; then 30 SEMICOLON="YES" 31 fi 32 fi 27 33 } 28 34 29 35 mcisofs_list () { … … 38 44 *) MYCAT="cat";; 39 45 esac 40 46 41 $ISOINFO -l -i "$1" | @AWK@'47 $ISOINFO -l -i "$1" 2>/dev/null | @AWK@ -v SEMICOLON=$SEMICOLON ' 42 48 BEGIN { 43 49 dir=""; 44 50 # Pattern to match 8 first fields. … … 60 66 sub(irx, "", name) 61 67 sub("^---------- 0 0 0", "-r--r--r-- 1 root root", attr) 62 68 sub(" $", "", name) 69 # for Joliet UCS level 3 70 if (SEMICOLON = "YES") sub(";1$", "", name); 63 71 ## sub(";[0-9]+$", "", name) ## would break copyout 64 72 # skip . and .. 65 73 if (name ~ /^\.\.?/) next; … … 68 76 } 69 77 70 78 mcisofs_copyout () { 71 $ISOINFO -i "$1" -x "/$2" > "$3" 79 if [ "x$SEMICOLON" == "xYES" ]; then 80 $ISOINFO -i "$1" -x "/$2;1" 2>/dev/null > "$3" 81 else 82 $ISOINFO -i "$1" -x "/$2" 2>/dev/null > "$3" 83 fi 72 84 } 73 85 74 86 LC_ALL=C