mirror of
https://github.com/danog/file.git
synced 2024-11-30 04:19:39 +01:00
Remove bogus array_filter to allow 0 as directory name
This commit is contained in:
parent
62428ca0ef
commit
1a46ea9b13
@ -394,7 +394,7 @@ class EioDriver implements Driver {
|
|||||||
|
|
||||||
if ($recursive) {
|
if ($recursive) {
|
||||||
$path = str_replace("/", DIRECTORY_SEPARATOR, $path);
|
$path = str_replace("/", DIRECTORY_SEPARATOR, $path);
|
||||||
$arrayPath = array_filter(explode(DIRECTORY_SEPARATOR, $path));
|
$arrayPath = explode(DIRECTORY_SEPARATOR, $path);
|
||||||
$tmpPath = "";
|
$tmpPath = "";
|
||||||
|
|
||||||
$callback = function () use (
|
$callback = function () use (
|
||||||
|
@ -352,7 +352,7 @@ class UvDriver implements Driver {
|
|||||||
|
|
||||||
if ($recursive) {
|
if ($recursive) {
|
||||||
$path = str_replace("/", DIRECTORY_SEPARATOR, $path);
|
$path = str_replace("/", DIRECTORY_SEPARATOR, $path);
|
||||||
$arrayPath = array_filter(explode(DIRECTORY_SEPARATOR, $path));
|
$arrayPath = explode(DIRECTORY_SEPARATOR, $path);
|
||||||
$tmpPath = "";
|
$tmpPath = "";
|
||||||
|
|
||||||
$callback = function () use (
|
$callback = function () use (
|
||||||
|
@ -230,7 +230,8 @@ abstract class DriverTest extends TestCase {
|
|||||||
yield File\rmdir($dir);
|
yield File\rmdir($dir);
|
||||||
$this->assertNull(yield File\stat($dir));
|
$this->assertNull(yield File\stat($dir));
|
||||||
|
|
||||||
$dir = "{$fixtureDir}/newdir/with/recursive/creation";
|
// test for 0, because previous array_filter made that not work
|
||||||
|
$dir = "{$fixtureDir}/newdir/with/recursive/creation/0/1/2";
|
||||||
|
|
||||||
yield File\mkdir($dir, 0764, true); // the umask is 022 by default
|
yield File\mkdir($dir, 0764, true); // the umask is 022 by default
|
||||||
$stat = yield File\stat($dir);
|
$stat = yield File\stat($dir);
|
||||||
|
Loading…
Reference in New Issue
Block a user