Skip to content
Snippets Groups Projects
Commit 89ff8c4d authored by Demian Katz's avatar Demian Katz Committed by André Lahmann
Browse files

Do not attempt to copy files that do not yet exist.

parent 26b690da
Branches
Tags
No related merge requests found
...@@ -365,7 +365,7 @@ class Upgrade ...@@ -365,7 +365,7 @@ class Upgrade
// If target file already exists, back it up: // If target file already exists, back it up:
$outfile = $this->newDir . '/' . $filename; $outfile = $this->newDir . '/' . $filename;
$bakfile = $outfile . '.bak.' . time(); $bakfile = $outfile . '.bak.' . time();
if (!copy($outfile, $bakfile)) { if (file_exists($outfile) && !copy($outfile, $bakfile)) {
throw new FileAccessException( throw new FileAccessException(
"Error: Could not copy {$outfile} to {$bakfile}." "Error: Could not copy {$outfile} to {$bakfile}."
); );
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment