Skip to content

Commit 95f39bc

Browse files
author
euromark
committed
Let Folder class create files recursively to avoid errors.
1 parent 5eeb5cb commit 95f39bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Filesystem/Folder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ public function create($pathname, $mode = false) {
535535
if ($this->create($nextPathname, $mode)) {
536536
if (!file_exists($pathname)) {
537537
$old = umask(0);
538-
if (mkdir($pathname, $mode)) {
538+
if (mkdir($pathname, $mode, true)) {
539539
umask($old);
540540
$this->_messages[] = sprintf('%s created', $pathname);
541541
return true;
@@ -716,7 +716,7 @@ public function copy($options) {
716716

717717
if (is_dir($from) && !file_exists($to)) {
718718
$old = umask(0);
719-
if (mkdir($to, $mode)) {
719+
if (mkdir($to, $mode, true)) {
720720
umask($old);
721721
$old = umask(0);
722722
chmod($to, $mode);

0 commit comments

Comments
 (0)