[Filesystem] Check that the directory is writable after created it in dumpFile()

This commit is contained in:
Robin Chalas 2017-01-08 13:55:49 +01:00
parent 182dd8f7e6
commit dbc4148535
No known key found for this signature in database
GPG Key ID: 89672113756EE03B
1 changed files with 3 additions and 1 deletions

View File

@ -498,7 +498,9 @@ class Filesystem
if (!is_dir($dir)) {
$this->mkdir($dir);
} elseif (!is_writable($dir)) {
}
if (!is_writable($dir)) {
throw new IOException(sprintf('Unable to write to the "%s" directory.', $dir), 0, null, $dir);
}