diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index f035e616d..425a47473 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -383,6 +383,9 @@ SQL; Logging::info("User ".$user->getLogin()." is deleting file: ".$this->_file->getDbTrackTitle()." - file id: ".$file_id); $filesize = $this->_file->getFileSize(); + if ($filesize <= 0) { + throw new Exception("Cannot delete file with filesize ".$filesize); + } //Delete the physical file from either the local stor directory //or from the cloud