2012-01-13 21:23:03 +00:00
|
|
|
|
|
|
|
if {![exists -proc tdelete]} {
|
|
|
|
proc tdelete {path} {
|
|
|
|
if {[file isdirectory $path]} {
|
2012-01-14 00:29:44 +00:00
|
|
|
regsub -all {([\\["$])} $path {\\\1} cpath
|
|
|
|
foreach file [glob -nocomplain "${cpath}/*"] {
|
2012-01-13 21:23:03 +00:00
|
|
|
if {[file isdirectory $file]} {
|
2012-01-14 00:29:44 +00:00
|
|
|
tdelete $file
|
2012-01-13 21:23:03 +00:00
|
|
|
} else {
|
|
|
|
exec /mod/bin/trm $file
|
|
|
|
}
|
|
|
|
}
|
|
|
|
exec /mod/bin/busybox/rm -rf $path
|
|
|
|
} else {
|
|
|
|
exec /mod/bin/trm $path
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|