ALT Linux repos
Group :: File tools
RPM: mc
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: mc-4.6.1-alt-wrapper.patch
Download
Download
--- mc/lib/mc-wrapper.sh.in.orig 2002-12-26 20:56:00 +0300
+++ mc/lib/mc-wrapper.sh.in 2002-12-26 21:02:28 +0300
@@ -1,5 +1,7 @@
MC_USER=`id | sed 's/[^(]*(//;s/).*//'`
-MC_PWD_FILE="${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.$$"
-@bindir@/mc -P "$MC_PWD_FILE" "$@"
+[ ! -d ${TMPDIR-/tmp}/mc-$MC_USER ] && mkdir -p ${TMPDIR-/tmp}/mc-$MC_USER
+if MC_PWD_FILE=`mktemp ${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.XXXXXXXXXX`; then
+rm -f "$MC_PWD_FILE"
+@bindir@/mc -r -P "$MC_PWD_FILE" "$@"
if test -r "$MC_PWD_FILE"; then
@@ -11,3 +11,4 @@
rm -f "$MC_PWD_FILE"
unset MC_PWD_FILE
+fi