Skip to content

Commit 7bb4769

Browse files
mmenozzikelunik
authored andcommitted
Fix mkdir mode in Driver and implementations (#27)
1 parent 59d14c7 commit 7bb4769

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

lib/BlockingDriver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public function unlink(string $path): Promise {
262262
/**
263263
* {@inheritdoc}
264264
*/
265-
public function mkdir(string $path, int $mode = 0644, bool $recursive = false): Promise {
265+
public function mkdir(string $path, int $mode = 0777, bool $recursive = false): Promise {
266266
return new Success((bool) @\mkdir($path, $mode, $recursive));
267267
}
268268

lib/Driver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function unlink(string $path): Promise;
151151
* @param bool $recursive
152152
* @return \Amp\Promise
153153
*/
154-
public function mkdir(string $path, int $mode = 0644, bool $recursive = false): Promise;
154+
public function mkdir(string $path, int $mode = 0777, bool $recursive = false): Promise;
155155

156156
/**
157157
* Delete a directory.

lib/EioDriver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ private function onUnlink($data, $result, $req) {
349349
/**
350350
* {@inheritdoc}
351351
*/
352-
public function mkdir(string $path, int $mode = 0644, bool $recursive = false): Promise {
352+
public function mkdir(string $path, int $mode = 0777, bool $recursive = false): Promise {
353353
$deferred = new Deferred;
354354
$this->poll->listen($deferred->promise());
355355

lib/ParallelDriver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function readlink(string $path): Promise {
142142
/**
143143
* {@inheritdoc}
144144
*/
145-
public function mkdir(string $path, int $mode = 0644, bool $recursive = false): Promise {
145+
public function mkdir(string $path, int $mode = 0777, bool $recursive = false): Promise {
146146
return new Coroutine($this->runFileTask(new Internal\FileTask("mkdir", [$path, $mode, $recursive])));
147147
}
148148

lib/UvDriver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ public function unlink(string $path): Promise {
352352
/**
353353
* {@inheritdoc}
354354
*/
355-
public function mkdir(string $path, int $mode = 0644, bool $recursive = false): Promise {
355+
public function mkdir(string $path, int $mode = 0777, bool $recursive = false): Promise {
356356
$deferred = new Deferred;
357357
$this->poll->listen($deferred->promise());
358358

0 commit comments

Comments
 (0)