-
Notifications
You must be signed in to change notification settings - Fork 825
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
flysystem-webdav - WebDAVAdapter.php - createDirectory() not working allways #1689
Comments
This would not only affect WebDAV, but at least also InMemory, StaticInMemory and ZipArchive. Example test: /**
* @test
*
* @dataProvider directoryPrefixProvider
*/
public function ensure_prefixed_directories_are_created_issue_1689(string $path): void
{
$this->runScenario(function () use ($path) {
$adapter = $this->adapter();
$adapter->createDirectory(
$path.'test',
new Config()
);
$this->assertTrue($adapter->directoryExists('test'));
});
}
public static function directoryPrefixProvider(): iterable
{
yield [ './'];
yield [ '/'];
yield [ '/./'];
} And what about creating a file If you think it's worth, feel free to create a PR to fix it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In "WebDAVAdapter.php" file, the function "createDirectory" does not work,
if a directory specified for "$path" starts with a "." or "/". The function will "return" directly.
Line 219 says "return" it must be "continue" and everything works fine.
Please fix it.
Thanks Christian
The text was updated successfully, but these errors were encountered: