MDL-57801 core_filestorage: Delete temp file if disk space runs out
This commit is contained in:
@@ -421,6 +421,7 @@ class file_system_filedir extends file_system {
|
||||
@unlink($hashfile.'.tmp');
|
||||
if (!copy($pathname, $hashfile.'.tmp')) {
|
||||
// Borked permissions or out of disk space.
|
||||
@unlink($hashfile.'.tmp');
|
||||
ignore_user_abort($prev);
|
||||
throw new file_exception('storedfilecannotcreatefile');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user