Skip to content

Commit

Permalink
Let Folder class create files recursively to avoid errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Nov 10, 2014
1 parent 5eeb5cb commit 95f39bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Filesystem/Folder.php
Expand Up @@ -535,7 +535,7 @@ public function create($pathname, $mode = false) {
if ($this->create($nextPathname, $mode)) {
if (!file_exists($pathname)) {
$old = umask(0);
if (mkdir($pathname, $mode)) {
if (mkdir($pathname, $mode, true)) {
umask($old);
$this->_messages[] = sprintf('%s created', $pathname);
return true;
Expand Down Expand Up @@ -716,7 +716,7 @@ public function copy($options) {

if (is_dir($from) && !file_exists($to)) {
$old = umask(0);
if (mkdir($to, $mode)) {
if (mkdir($to, $mode, true)) {
umask($old);
$old = umask(0);
chmod($to, $mode);
Expand Down

0 comments on commit 95f39bc

Please sign in to comment.