mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Merge branch '3993_iso9660_error_report'
* 3993_iso9660_error_report: iso9660: report errors in copyout in case of isoinfo usage. Ticket #3933: report iso9660 listing errors.
This commit is contained in:
commit
27fe8f39a3
@ -93,6 +93,8 @@ xorriso_rm() {
|
|||||||
|
|
||||||
# tested to comply with isoinfo 2.0's output
|
# tested to comply with isoinfo 2.0's output
|
||||||
test_iso () {
|
test_iso () {
|
||||||
|
which isoinfo 2>/dev/null || (echo "isoinfo not found" >&2; return 1)
|
||||||
|
|
||||||
CHARSET=$(locale charmap 2>/dev/null)
|
CHARSET=$(locale charmap 2>/dev/null)
|
||||||
if test -z "$CHARSET"; then
|
if test -z "$CHARSET"; then
|
||||||
CHARSET=$(locale 2>/dev/null | @GREP@ LC_CTYPE | sed -n -e 's/.*\.\(.*\)"$/\1/p')
|
CHARSET=$(locale 2>/dev/null | @GREP@ LC_CTYPE | sed -n -e 's/.*\.\(.*\)"$/\1/p')
|
||||||
@ -119,6 +121,8 @@ test_iso () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mcisofs_list () {
|
mcisofs_list () {
|
||||||
|
local lsl r
|
||||||
|
|
||||||
# left as a reminder to implement compressed image support =)
|
# left as a reminder to implement compressed image support =)
|
||||||
case "$1" in
|
case "$1" in
|
||||||
*.lz) MYCAT="lzip -dc";;
|
*.lz) MYCAT="lzip -dc";;
|
||||||
@ -133,7 +137,11 @@ mcisofs_list () {
|
|||||||
*) MYCAT="cat";;
|
*) MYCAT="cat";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
$ISOINFO -l -i "$1" 2>/dev/null | @AWK@ -v SEMICOLON=$SEMICOLON '
|
lsl=$($ISOINFO -l -i "$1" 2>/dev/null)
|
||||||
|
r=$?
|
||||||
|
test $r -gt 0 && return $r
|
||||||
|
|
||||||
|
echo "$lsl" | @AWK@ -v SEMICOLON=$SEMICOLON '
|
||||||
BEGIN {
|
BEGIN {
|
||||||
dir="";
|
dir="";
|
||||||
# Pattern to match 8 first fields.
|
# Pattern to match 8 first fields.
|
||||||
@ -183,8 +191,8 @@ shift
|
|||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
list)
|
list)
|
||||||
xorriso_list "$@" || {
|
xorriso_list "$@" || {
|
||||||
test_iso "$@";
|
test_iso "$@" || exit 1
|
||||||
mcisofs_list "$@";
|
mcisofs_list "$@" || exit 1
|
||||||
}
|
}
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
@ -214,8 +222,8 @@ case "$cmd" in
|
|||||||
;;
|
;;
|
||||||
copyout)
|
copyout)
|
||||||
xorriso_copyout "$@" || {
|
xorriso_copyout "$@" || {
|
||||||
test_iso "$@";
|
test_iso "$@" || exit 1
|
||||||
mcisofs_copyout "$@";
|
mcisofs_copyout "$@" || exit 1
|
||||||
}
|
}
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user