bug #14246 [Filesystem] dumpFile() non atomic
This commit is contained in:
parent
6b13708ab6
commit
e4015d5cc3
@ -477,9 +477,9 @@ class Filesystem
|
|||||||
throw new IOException(sprintf('Failed to write file "%s".', $filename));
|
throw new IOException(sprintf('Failed to write file "%s".', $filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->rename($tmpFile, $filename, true);
|
|
||||||
if (null !== $mode) {
|
if (null !== $mode) {
|
||||||
$this->chmod($filename, $mode);
|
$this->chmod($tmpFile, $mode);
|
||||||
}
|
}
|
||||||
|
$this->rename($tmpFile, $filename, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user