From 909605b07411223557b8121259dd58d2ef42b409 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Fri, 27 Jan 2012 21:54:39 +0000 Subject: [PATCH] fix deletions from non-mediaroot paths git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@691 2a923420-c742-0410-a762-8d5b09965624 --- var/mongoose/cgi-bin/browse/delete.jim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/var/mongoose/cgi-bin/browse/delete.jim b/var/mongoose/cgi-bin/browse/delete.jim index a3c38e7..e1af184 100755 --- a/var/mongoose/cgi-bin/browse/delete.jim +++ b/var/mongoose/cgi-bin/browse/delete.jim @@ -23,9 +23,10 @@ if {[system pkginst undelete]} { proc bindir {file} { global dustbin set dir [file dirname $file] - regsub "^[system mediaroot]" $dir $dustbin dir - system mkdir_p $dir - return $dir + regsub "^[system mediaroot]" $dir $dustbin ndir + if {$dir eq $ndir} { set ndir $dustbin } + system mkdir_p $ndir + return $ndir } proc touch {file} {