diff --git a/vfs/extfs/zoo.in b/vfs/extfs/zoo.in index 2d36ad61d..a7a195c7f 100644 --- a/vfs/extfs/zoo.in +++ b/vfs/extfs/zoo.in @@ -1,4 +1,14 @@ #! /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 mczoofs_list () @@ -32,13 +42,18 @@ mczoofs_copyout () } # zoo is stupid and won't be happy when the name has no extension. -# We have to do a small trick :) -if echo $2 | grep '\.zoo'; then +# We have to do a small trick :) [pretty dirty, broken hack -- pavel] +if echo $2 | grep '\.zoo$'; then : else - SYMLINK=$2.zoo + SYMLINK=~/.mc/temporary.$2.zoo 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 ln -s $2 $SYMLINK trap 'rm -f $SYMLINK' 0 1 2 3 5 13 15