MDL-57801 core_filestorage: Delete temp file if disk space runs out
This commit is contained in:
@@ -2001,6 +2001,7 @@ class file_storage {
|
||||
@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