bug #14246 [Filesystem] dumpFile() non atomic

This commit is contained in:
Hidde Boomsma 2015-12-31 09:33:31 +01:00
parent 6b13708ab6
commit e4015d5cc3
1 changed files with 2 additions and 2 deletions

View File

@ -477,9 +477,9 @@ class Filesystem
throw new IOException(sprintf('Failed to write file "%s".', $filename));
}
$this->rename($tmpFile, $filename, true);
if (null !== $mode) {
$this->chmod($filename, $mode);
$this->chmod($tmpFile, $mode);
}
$this->rename($tmpFile, $filename, true);
}
}