Skip to content

Commit 3f81e20

Browse files
committed
[WebDAV] createDirectory - not throw if got 405 (The resource you tried to create already exists)
1 parent edc1bb7 commit 3f81e20

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/WebDAV/WebDAVAdapter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ public function createDirectory(string $path, Config $config): void
233233
throw UnableToCreateDirectory::dueToFailure($path, $exception);
234234
}
235235

236+
if ($response['statusCode'] === 405) {
237+
continue;
238+
}
239+
236240
if ($response['statusCode'] !== 201) {
237241
throw UnableToCreateDirectory::atLocation($path, 'Failed to create directory at: ' . $location);
238242
}

0 commit comments

Comments
 (0)