From c6be96d04fb628466af7b444d31ea4703c9e1244 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 9 May 2022 16:56:40 +0200 Subject: [PATCH] additional logging when mkdir fails for object storage Signed-off-by: Robin Appelman --- lib/private/Files/ObjectStore/ObjectStoreStorage.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index 4ca00cf6a16f4..317868767241d 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -97,6 +97,7 @@ public function __construct($params) { 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 @@ public function mkdir($path) { 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