diff --git a/webif/lib/safe_delete b/webif/lib/safe_delete index 3e096eed..382ce718 100755 --- a/webif/lib/safe_delete +++ b/webif/lib/safe_delete @@ -36,6 +36,13 @@ if {![exists -proc _del_bindir]} { set dustbin 0 } + # Check if files are on same device as mediaroot + set dir [system mediaroot] + file stat "$dir/" rootstat + set rootdev $rootstat(dev) + file stat $file st + if {$st(dev) != $rootdev} {set dustbin 0} + # Directory if {[file isdirectory $file]} {