mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-01 00:54:24 +03:00
Pavel Machek's zoofs patch
This commit is contained in:
parent
89d7d62094
commit
959885252a
@ -1,4 +1,14 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Zoo file system
|
||||||
|
#
|
||||||
|
# Copyright ? U. N. Known
|
||||||
|
#
|
||||||
|
# This filesystem is _dangerous_. It used to create symlinks in filesystem
|
||||||
|
# with zoo file, it used to happily delete file from your filesystem.
|
||||||
|
# Now it is 'only' very ugly (it creates temporary files in ~/.mc/
|
||||||
|
#
|
||||||
|
|
||||||
ZOO=zoo
|
ZOO=zoo
|
||||||
|
|
||||||
mczoofs_list ()
|
mczoofs_list ()
|
||||||
@ -32,13 +42,18 @@ mczoofs_copyout ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
# zoo is stupid and won't be happy when the name has no extension.
|
# zoo is stupid and won't be happy when the name has no extension.
|
||||||
# We have to do a small trick :)
|
# We have to do a small trick :) [pretty dirty, broken hack -- pavel]
|
||||||
if echo $2 | grep '\.zoo'; then
|
if echo $2 | grep '\.zoo$'; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
SYMLINK=$2.zoo
|
SYMLINK=~/.mc/temporary.$2.zoo
|
||||||
if test -f $SYMLINK; then
|
if test -f $SYMLINK; then
|
||||||
SYMLINK=$2.
|
SYMLINK=~/.mc/temporary.$2.
|
||||||
|
fi
|
||||||
|
if test -f $SYMLINK; then
|
||||||
|
echo "Ugh. I did not expect this to happen. Cleanup your ~/.mc."
|
||||||
|
sleep 5
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
ln -s $2 $SYMLINK
|
ln -s $2 $SYMLINK
|
||||||
trap 'rm -f $SYMLINK' 0 1 2 3 5 13 15
|
trap 'rm -f $SYMLINK' 0 1 2 3 5 13 15
|
||||||
|
Loading…
Reference in New Issue
Block a user