Open therealmikz opened 8 years ago
I found that escaping spaces resolves that problem. I'd post PR if I could, but unfortunately can't get unit tests to pass on my configuration. Here's solution:
$dirName = preg_replace('/(?<!\\\\) /', '\\ ', $dirName);
This solution does not work if you use findFileByName
or findDirectoryByName
methods. This PR probably broke it #7
Example (assuming that /foo bar/baz exists):
$ftp->directoryExists('/foo bar/baz'); //false
My PHP version: PHP 5.5.9-1ubuntu4.17 (cli) (built: May 19 2016 19:05:57) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies