mirror of
https://github.com/nextcloud/server.git
synced 2026-02-19 02:38:40 -05:00
Merge pull request #58107 from nextcloud/local-preview-mkdir-exists
fix: don't try to create preview folder if it already exists
This commit is contained in:
commit
2391d58eb0
1 changed files with 3 additions and 1 deletions
|
|
@ -81,7 +81,9 @@ class LocalPreviewStorage implements IPreviewStorage {
|
|||
|
||||
private function createParentFiles(string $path): void {
|
||||
$dirname = dirname($path);
|
||||
@mkdir($dirname, recursive: true);
|
||||
if (!is_dir($dirname)) {
|
||||
mkdir($dirname, recursive: true);
|
||||
}
|
||||
if (!is_dir($dirname)) {
|
||||
throw new NotPermittedException("Unable to create directory '$dirname'");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue