From d2e4e10919bb80470cbd5a5a8cc72a7da9828bbd Mon Sep 17 00:00:00 2001 From: MymsMan Date: Thu, 20 Feb 2020 22:41:25 +0000 Subject: [PATCH] Don't move files on other devices to Dustbin --- webif/lib/safe_delete | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webif/lib/safe_delete b/webif/lib/safe_delete index 3e096ee..382ce71 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]} {