CC-5807: Disk Space will be updated when file is not actually deleted
This commit is contained in:
parent
42806b1cbf
commit
d081ff10b2
|
@ -372,9 +372,6 @@ SQL;
|
|||
{
|
||||
$filepath = $this->getFilePath();
|
||||
|
||||
//Update the user's disk usage
|
||||
Application_Model_Preference::updateDiskUsage(-1 * abs(filesize($filepath)));
|
||||
|
||||
// Check if the file is scheduled to be played in the future
|
||||
if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->getId())) {
|
||||
throw new DeleteScheduledFileException();
|
||||
|
@ -394,6 +391,9 @@ SQL;
|
|||
|
||||
if (file_exists($filepath) && $type == "stor") {
|
||||
try {
|
||||
//Update the user's disk usage
|
||||
Application_Model_Preference::updateDiskUsage(-1 * abs(filesize($filepath)));
|
||||
|
||||
unlink($filepath);
|
||||
} catch (Exception $e) {
|
||||
Logging::error($e->getMessage());
|
||||
|
|
Loading…
Reference in New Issue