Skip to content

Commit

Permalink
MDL-55513 core_filestorage: Pass full path of temp dir to remove_dir()
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyjbutler committed Aug 10, 2016
1 parent 7752762 commit e98483d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/filestorage/file_storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ protected function create_converted_document(stored_file $file, $format) {
throw new file_exception('storedfileproblem', 'Could not copy file contents to temp file.');
}
} catch (file_exception $fe) {
remove_dir($uniqdir);
remove_dir($tmp);
throw $fe;
}

Expand All @@ -387,7 +387,7 @@ protected function create_converted_document(stored_file $file, $format) {
$result = exec($cmd, $output);
chdir($currentdir);
if (!file_exists($newtmpfile)) {
remove_dir($uniqdir);
remove_dir($tmp);
// Cleanup.
return false;
}
Expand All @@ -404,7 +404,7 @@ protected function create_converted_document(stored_file $file, $format) {

$convertedfile = $this->create_file_from_pathname($record, $newtmpfile);
// Cleanup.
remove_dir($uniqdir);
remove_dir($tmp);
return $convertedfile;
}

Expand Down

0 comments on commit e98483d

Please sign in to comment.