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} {