Fixed deleting failed uploads

This commit is contained in:
Albert Santoni 2015-03-03 13:44:42 -05:00
parent 8a6ee8ad14
commit 1f6f880dad
2 changed files with 6 additions and 1 deletions

View file

@ -398,7 +398,9 @@ SQL;
//Delete the physical file from either the local stor directory
//or from the cloud
$this->_file->deletePhysicalFile();
if ($this->_file->getDbImportStatus() == CcFiles::IMPORT_STATUS_SUCCESS) {
$this->_file->deletePhysicalFile();
}
//Update the user's disk usage
Application_Model_Preference::updateDiskUsage(-1 * $filesize);