Browse Source

Let Folder class create files recursively to avoid errors.

euromark 11 years ago
parent
commit
95f39bcc6f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Filesystem/Folder.php

+ 2 - 2
src/Filesystem/Folder.php

@@ -535,7 +535,7 @@ class Folder {
 		if ($this->create($nextPathname, $mode)) {
 		if ($this->create($nextPathname, $mode)) {
 			if (!file_exists($pathname)) {
 			if (!file_exists($pathname)) {
 				$old = umask(0);
 				$old = umask(0);
-				if (mkdir($pathname, $mode)) {
+				if (mkdir($pathname, $mode, true)) {
 					umask($old);
 					umask($old);
 					$this->_messages[] = sprintf('%s created', $pathname);
 					$this->_messages[] = sprintf('%s created', $pathname);
 					return true;
 					return true;
@@ -716,7 +716,7 @@ class Folder {
 
 
 					if (is_dir($from) && !file_exists($to)) {
 					if (is_dir($from) && !file_exists($to)) {
 						$old = umask(0);
 						$old = umask(0);
-						if (mkdir($to, $mode)) {
+						if (mkdir($to, $mode, true)) {
 							umask($old);
 							umask($old);
 							$old = umask(0);
 							$old = umask(0);
 							chmod($to, $mode);
 							chmod($to, $mode);