Skip to content

Commit

Permalink
Fix WebDAVAdapter createDirectory (fix thephpleague#1689)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicofrand committed Feb 6, 2025
1 parent e96dfac commit 5e28ed6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/WebDAV/WebDAVAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ public function createDirectory(string $path, Config $config): void

foreach ($parts as $directory) {
if ($directory === '.' || $directory === '') {
return;
continue;
}

$directoryParts[] = $directory;
$directoryPath = implode('/', $directoryParts);
$location = $this->encodePath($directoryPath) . '/';
$location = '/' . $this->encodePath($directoryPath) . '/';

if ($this->directoryExists($this->prefixer->stripDirectoryPrefix($directoryPath))) {
if ($this->directoryExists($this->prefixer->stripDirectoryPrefix($location))) {
continue;
}

Expand Down

0 comments on commit 5e28ed6

Please sign in to comment.