1
0
forked from GitHub/gf-core

gfse: various small improvements

This commit is contained in:
hallgren
2011-07-25 19:21:46 +00:00
parent 848373e29e
commit 0f7743992b
5 changed files with 60 additions and 16 deletions

View File

@@ -162,11 +162,17 @@ case "$REQUEST_METHOD" in
if [ -d "$path" ] ; then
ContentType="text/plain; charset=$charset"
cgiheaders
cd "$path"
shopt -s nullglob
rm *.gf *.gfo *-*.json *.pgf grammars.cgi
cd ..
rmdir "$path"
if [ -h "$path" ] ; then
cd "$path"
cd ..
rm "$path"
else
cd "$path"
shopt -s nullglob
rm *.gf *.gfo *-*.json *.pgf grammars.cgi
cd ..
rmdir "$path"
fi
newdir=$(qparse "$QUERY_STRING" newdir)
case "$newdir" in
/tmp/gfse.*) # shouldn't allow .. in path !!!