diff --git a/lib/EioDriver.php b/lib/EioDriver.php index 133cbac..875c9a9 100644 --- a/lib/EioDriver.php +++ b/lib/EioDriver.php @@ -393,7 +393,7 @@ class EioDriver implements Driver { $priority = \EIO_PRI_DEFAULT; if ($recursive) { - $path = str_replace("/", DIRECTORY_SEPARATOR, $path); + $path = str_replace(["/", "\\"], DIRECTORY_SEPARATOR, $path); $arrayPath = explode(DIRECTORY_SEPARATOR, $path); $tmpPath = ""; diff --git a/lib/UvDriver.php b/lib/UvDriver.php index f8d838e..edbfc37 100644 --- a/lib/UvDriver.php +++ b/lib/UvDriver.php @@ -351,7 +351,7 @@ class UvDriver implements Driver { $deferred = new Deferred; if ($recursive) { - $path = str_replace("/", DIRECTORY_SEPARATOR, $path); + $path = str_replace(["/", "\\"], DIRECTORY_SEPARATOR, $path); $arrayPath = explode(DIRECTORY_SEPARATOR, $path); $tmpPath = ""; diff --git a/lib/functions.php b/lib/functions.php index 991f7c8..51853eb 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -3,7 +3,6 @@ namespace Amp\File; use Amp\Loop; -use Amp\Parallel\Worker\Worker; use Amp\Promise; const LOOP_STATE_IDENTIFIER = Driver::class;