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);

View File

@ -5,6 +5,9 @@ require_once 'ProxyStorageBackend.php';
/**
* Skeleton subclass for representing a row from the 'cloud_file' table.
*
* This class uses Propel's delegation feature to virtually inherit from CcFile!
* You can call any CcFile method on this function and it will work! -- Albert
*
* Each cloud_file has a corresponding cc_file referenced as a foreign key.
* The file's metadata is stored in the cc_file table. This, cloud_file,
* table represents files that are stored in the cloud.