Merge pull request #35 from brikou/master
[DDC-1136] prevent backup file to be recognized as valid Entity file
This commit is contained in:
commit
814473c27d
@ -183,7 +183,7 @@ public function <methodName>()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->_backupExisting && file_exists($path)) {
|
if ($this->_backupExisting && file_exists($path)) {
|
||||||
$backupPath = dirname($path) . DIRECTORY_SEPARATOR . "~" . basename($path);
|
$backupPath = dirname($path) . DIRECTORY_SEPARATOR . basename($path) . "~";
|
||||||
if (!copy($path, $backupPath)) {
|
if (!copy($path, $backupPath)) {
|
||||||
throw new \RuntimeException("Attempt to backup overwritten entitiy file but copy operation failed.");
|
throw new \RuntimeException("Attempt to backup overwritten entitiy file but copy operation failed.");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user