mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
additional logging when mkdir fails for object storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
a1b7f132c8
commit
c6be96d04f
1 changed files with 3 additions and 0 deletions
|
|
@ -97,6 +97,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
|
|||
public function mkdir($path) {
|
||||
$path = $this->normalizePath($path);
|
||||
if ($this->file_exists($path)) {
|
||||
$this->logger->warning("Tried to create an object store folder that already exists: $path");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -120,10 +121,12 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
|
|||
if ($parentType === false) {
|
||||
if (!$this->mkdir($parent)) {
|
||||
// something went wrong
|
||||
$this->logger->warning("Parent folder ($parent) doesn't exist and couldn't be created");
|
||||
return false;
|
||||
}
|
||||
} elseif ($parentType === 'file') {
|
||||
// parent is a file
|
||||
$this->logger->warning("Parent ($parent) is a file");
|
||||
return false;
|
||||
}
|
||||
// finally create the new dir
|
||||
|
|
|
|||
Loading…
Reference in a new issue