mirror of
https://github.com/danog/file.git
synced 2024-11-30 04:19:39 +01:00
Handle backslashes in paths correctly
This commit is contained in:
parent
1a46ea9b13
commit
0708ba14b3
@ -393,7 +393,7 @@ class EioDriver implements Driver {
|
|||||||
$priority = \EIO_PRI_DEFAULT;
|
$priority = \EIO_PRI_DEFAULT;
|
||||||
|
|
||||||
if ($recursive) {
|
if ($recursive) {
|
||||||
$path = str_replace("/", DIRECTORY_SEPARATOR, $path);
|
$path = str_replace(["/", "\\"], DIRECTORY_SEPARATOR, $path);
|
||||||
$arrayPath = explode(DIRECTORY_SEPARATOR, $path);
|
$arrayPath = explode(DIRECTORY_SEPARATOR, $path);
|
||||||
$tmpPath = "";
|
$tmpPath = "";
|
||||||
|
|
||||||
|
@ -351,7 +351,7 @@ class UvDriver implements Driver {
|
|||||||
$deferred = new Deferred;
|
$deferred = new Deferred;
|
||||||
|
|
||||||
if ($recursive) {
|
if ($recursive) {
|
||||||
$path = str_replace("/", DIRECTORY_SEPARATOR, $path);
|
$path = str_replace(["/", "\\"], DIRECTORY_SEPARATOR, $path);
|
||||||
$arrayPath = explode(DIRECTORY_SEPARATOR, $path);
|
$arrayPath = explode(DIRECTORY_SEPARATOR, $path);
|
||||||
$tmpPath = "";
|
$tmpPath = "";
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace Amp\File;
|
namespace Amp\File;
|
||||||
|
|
||||||
use Amp\Loop;
|
use Amp\Loop;
|
||||||
use Amp\Parallel\Worker\Worker;
|
|
||||||
use Amp\Promise;
|
use Amp\Promise;
|
||||||
|
|
||||||
const LOOP_STATE_IDENTIFIER = Driver::class;
|
const LOOP_STATE_IDENTIFIER = Driver::class;
|
||||||
|
Loading…
Reference in New Issue
Block a user