Skip to content

Commit

Permalink
FileSystem::write(): Exception should contain current mode for better…
Browse files Browse the repository at this point in the history
… debug.
  • Loading branch information
janbarasek authored and dg committed May 27, 2020
1 parent 906e829 commit ca47cf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utils/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public static function write(string $file, string $content, ?int $mode = 0666):
throw new Nette\IOException("Unable to write file '$file'. " . Helpers::getLastError());
}
if ($mode !== null && !@chmod($file, $mode)) { // @ is escalated to exception
throw new Nette\IOException("Unable to chmod file '$file'. " . Helpers::getLastError());
throw new Nette\IOException("Unable to chmod file '$file' to mode " . decoct($mode) . '. ' . Helpers::getLastError());
}
}

Expand Down

0 comments on commit ca47cf7

Please sign in to comment.