Try to silence another permissions error problem

This commit is contained in:
Albert Santoni 2015-03-25 17:34:38 -04:00
parent 99d16444d2
commit 58624ec100
1 changed files with 5 additions and 0 deletions

View File

@ -984,6 +984,11 @@ SQL;
} else {
Logging::info("Moving file $audio_file to $audio_stor");
//Ensure we have permissions to overwrite the file in stor, in case it already exists.
if (file_exists($audio_stor)) {
chmod($audio_stor, 0644);
}
// Martin K.: changed to rename: Much less load + quicker since this is
// an atomic operation
if (rename($audio_file, $audio_stor) === false) {