From d13ade977ab7332ce9e0860a307d92b5bb2bb876 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 28 Jun 2012 13:28:45 -0400 Subject: [PATCH] CC-4034: Files on Watched folder shouldn't be deleted physically. - fixed --- airtime_mvc/application/models/StoredFile.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index ccee5525c..a422b33f8 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -327,7 +327,10 @@ class Application_Model_StoredFile { throw new DeleteScheduledFileException(); } - if (file_exists($filepath)) { + $music_dir = Application_Model_MusicDir::getDirByPK($this->_file->getDbDirectory()); + $type = $music_dir->getType(); + + if (file_exists($filepath) && $type == "stor") { $data = array("filepath" => $filepath, "delete" => 1); Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data); }