webif/var/mongoose/lib/tdelete
hummypkg 3d75b93f1a allow deletions from inside dustbin
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@666 2a923420-c742-0410-a762-8d5b09965624
2012-01-14 00:29:44 +00:00

20 lines
379 B
Plaintext

if {![exists -proc tdelete]} {
proc tdelete {path} {
if {[file isdirectory $path]} {
regsub -all {([\\["$])} $path {\\\1} cpath
foreach file [glob -nocomplain "${cpath}/*"] {
if {[file isdirectory $file]} {
tdelete $file
} else {
exec /mod/bin/trm $file
}
}
exec /mod/bin/busybox/rm -rf $path
} else {
exec /mod/bin/trm $path
}
}
}