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();
|
$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
|
// Check if the file is scheduled to be played in the future
|
||||||
if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->getId())) {
|
if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->getId())) {
|
||||||
throw new DeleteScheduledFileException();
|
throw new DeleteScheduledFileException();
|
||||||
|
@ -394,6 +391,9 @@ SQL;
|
||||||
|
|
||||||
if (file_exists($filepath) && $type == "stor") {
|
if (file_exists($filepath) && $type == "stor") {
|
||||||
try {
|
try {
|
||||||
|
//Update the user's disk usage
|
||||||
|
Application_Model_Preference::updateDiskUsage(-1 * abs(filesize($filepath)));
|
||||||
|
|
||||||
unlink($filepath);
|
unlink($filepath);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Logging::error($e->getMessage());
|
Logging::error($e->getMessage());
|
||||||
|
|
Loading…
Reference in New Issue