-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileNotFoundException with sanitize_chars in directory name #18
Comments
@martinwang2002 Did you try the last unreleased changes on flysystem-google-drive-ext 1.x, flysystem-google-drive-ext/tests/GoogleDriveAdapterTests.php Lines 416 to 440 in 198be52
Give a try please, @masbug if works on this test, maybe he needs a new release, also there is'nt v2's release |
I run '[test]test/test.txt' on testing public function testWritingReadingFilesWithSpecialPath()
{
$adapter = $this->adapter();
foreach ([
'a path with square brackets in dirname 2' => '[test]test/test.txt',
] as $msg => $path) {
$adapter->write($path, 'contents', new Config());
$contents = $adapter->read($path);
$this->assertEquals('contents', isset($contents['contents']) ? $contents['contents'] : '', $msg);
}
} I get
|
Great! I have tested and it works. I got this package via packagist, so a new version is preferred. |
@masbug I have fixed some common bugs, and i made it works as expected behavior according v1 and v2 flysystem docs, so, when would the new release date be? |
@erikn69 Sorry for my tardiness. Thank you for the great work you've done so far! I tagged the releases for both branches. |
FileNotFoundException will raise if
sanitize_chars
exist in directory nameSample path to reproduce
I have passed
sanitize_chars
without[
and]
inoptions
ofMasbug\Flysystem\GoogleDriveAdapter
, but doesn't help.Logs
League\Flysystem\FileNotFoundExceptionFile not found at path: [test]test
at \vendor\masbug\flysystem-google-drive-ext\src\GoogleDriveAdapter.php:1773
1769▕ if($makeFullVirtualPath)
1770▕ return $this->makeFullVirtualPath($displayPath, $returnFirstItem);
1771▕
1772▕ if(empty($this->cachedPaths[$displayPath]))
➜ 1773▕ throw new FileNotFoundException($displayPath);
1774▕
1775▕ return $this->returnSingle($this->cachedPaths[$displayPath], $returnFirstItem);
1776▕ }
1777▕
1 \vendor\masbug\flysystem-google-drive-ext\src\GoogleDriveAdapter.php:1824
Masbug\Flysystem\GoogleDriveAdapter::toVirtualPath("[test]test")
2 \vendor\masbug\flysystem-google-drive-ext\src\GoogleDriveAdapter.php:297
Masbug\Flysystem\GoogleDriveAdapter::toSingleVirtualPath("[test]test")
The text was updated successfully, but these errors were encountered: