[Filesystem] fixed exception message when not a able to write to a directory #8587

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

deeky666 commented Jul 26, 2013

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

This simply fixes an exception message in the Filesystem Component when a directory is not writable while dumping a file via dumpFile().

@@ -456,7 +456,7 @@ public function dumpFile($filename, $content, $mode = 0666)
if (!is_dir($dir)) {
$this->mkdir($dir);
} elseif (!is_writable($dir)) {
- throw new IOException(sprintf('Unable to write in the %s directory\n', $dir));
+ throw new IOException(sprintf('Unable to write to directory "%s".', $dir));
@jakzal

jakzal Jul 27, 2013

Member

How about "Unable to write to the "%s" directory"? It reads better imho.

@hacfi

hacfi Jul 27, 2013

Contributor

+1

@fabpot fabpot closed this in 728d194 Aug 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment