mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
added patch from #194
This commit is contained in:
parent
1d8ef0b089
commit
adbe38172d
@ -5,6 +5,7 @@
|
|||||||
2009-02-03 Enrico Weigelt, metux ITS <weigelt@metux.de>
|
2009-02-03 Enrico Weigelt, metux ITS <weigelt@metux.de>
|
||||||
|
|
||||||
* lib/mc.lib: added patch on #219 by angel_il
|
* lib/mc.lib: added patch on #219 by angel_il
|
||||||
|
* vfs/extfs/u7z: patch from mandriva (#194)
|
||||||
|
|
||||||
2009-02-01 Enrico Weigelt, metux ITS <weigelt@metux.de>
|
2009-02-01 Enrico Weigelt, metux ITS <weigelt@metux.de>
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#
|
#
|
||||||
# extfs support for p7zip
|
# extfs support for p7zip
|
||||||
# Written by Pavel Roskin <proski@gnu.org>
|
# Written by Pavel Roskin <proski@gnu.org>
|
||||||
|
# Some Bugfixes/workarounds by Sergiy Niskorodov <sgh@mail.zp.ua>
|
||||||
# Licensed under GNU GPL version 2 or later version.
|
# Licensed under GNU GPL version 2 or later version.
|
||||||
|
|
||||||
P7ZIP=7za
|
P7ZIP=7za
|
||||||
@ -19,7 +20,10 @@ mcu7zip_list ()
|
|||||||
|
|
||||||
mcu7zip_copyout ()
|
mcu7zip_copyout ()
|
||||||
{
|
{
|
||||||
$P7ZIP e -so "$1" "$2" > "$3" 2>/dev/null
|
#first we check if we have old p7zip archive with prefix ./ in filename
|
||||||
|
$P7ZIP l "$1" "$2" | grep -q "0 files" && \
|
||||||
|
EXFNAME=*./"$2" || EXFNAME="$2"
|
||||||
|
$P7ZIP e -so "$1" "$EXFNAME" > "$3" 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
mcu7zip_copyin ()
|
mcu7zip_copyin ()
|
||||||
@ -31,19 +35,27 @@ mcu7zip_mkdir ()
|
|||||||
{
|
{
|
||||||
dir=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-u7z.XXXXXX"` || exit 1
|
dir=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-u7z.XXXXXX"` || exit 1
|
||||||
mkdir -p "$dir"/"$2"
|
mkdir -p "$dir"/"$2"
|
||||||
$P7ZIP a -w"$dir" "$1" "$2" >/dev/null 2>&1
|
$P7ZIP a -w"$dir" "$1" "$dir"/"$2" >/dev/null 2>&1
|
||||||
rm -rf "$dir"
|
rm -rf "$dir"
|
||||||
}
|
}
|
||||||
|
|
||||||
mcu7zip_rm ()
|
mcu7zip_rm ()
|
||||||
{
|
{
|
||||||
# NOTE: Version 4.20 fails to delete files in subdirectories
|
# NOTE: Version 4.20 fails to delete files in subdirectories
|
||||||
$P7ZIP d "$1" "$2" >/dev/null 2>&1
|
#first we check if we have old p7zip archive with prefix ./ in filename
|
||||||
|
$P7ZIP l "$1" "$2" | grep -q "0 files" && \
|
||||||
|
EXFNAME=*./"$2" || EXFNAME="$2"
|
||||||
|
$P7ZIP d "$1" "$EXFNAME" 2>&1 | grep -q E_NOTIMPL &> /dev/null && \
|
||||||
|
{ echo -e "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; }
|
||||||
}
|
}
|
||||||
|
|
||||||
mcu7zip_rmdir ()
|
mcu7zip_rmdir ()
|
||||||
{
|
{
|
||||||
$P7ZIP d "$1" "$2"/ >/dev/null 2>&1
|
#first we check if we have old p7zip archive with prefix ./ in filename
|
||||||
|
$P7ZIP l "$1" "$2" | grep -q "0 files" && \
|
||||||
|
EXFNAME=*./"$2" || EXFNAME="$2"
|
||||||
|
$P7ZIP d "$1" "$EXFNAME"/ 2>&1 | grep -q E_NOTIMPL &> /dev/null && \
|
||||||
|
{ echo -e "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; }
|
||||||
}
|
}
|
||||||
|
|
||||||
# override any locale for dates
|
# override any locale for dates
|
||||||
|
Loading…
Reference in New Issue
Block a user