diff options
author | Matthias Held <ilovemilk@wusa.io> | 2020-12-10 23:34:47 +0300 |
---|---|---|
committer | Matthias Held <ilovemilk@wusa.io> | 2020-12-10 23:34:47 +0300 |
commit | 2495469f32608b5d0c782452647fe3f246dc20e7 (patch) | |
tree | 9595f84a87cb44f912f216628fd2bfe71514cb18 | |
parent | 79058122e046cb13469986addbc54053eee21cd8 (diff) |
check if path is empty
-rw-r--r-- | lib/Monitor.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Monitor.php b/lib/Monitor.php index b1dad47..66cb750 100644 --- a/lib/Monitor.php +++ b/lib/Monitor.php @@ -136,6 +136,11 @@ class Monitor public function analyze($paths, $mode) { $path = $paths[0]; + + if ($path === '') { + $this->logger->debug("Path is empty."); + return; + } $storage = $this->rootFolder->getUserFolder($this->userId)->get(dirname($path))->getStorage(); if ($this->userId === null || $this->nestingLevel !== 0 || /*!$this->isUploadedFile($storage, $path) ||*/ $this->isCreatingSkeletonFiles()) { @@ -216,7 +221,7 @@ class Monitor return; case self::DELETE: - $this->logger->debug("Delete", ['app' => Application::APP_ID]); + $this->logger->debug("Delete ".$path, ['app' => Application::APP_ID]); // reset PROPFIND_COUNT $this->resetProfindCount(); @@ -242,7 +247,7 @@ class Monitor return; case self::CREATE: - $this->logger->debug("Create", ['app' => Application::APP_ID]); + $this->logger->debug("Create ".$path, ['app' => Application::APP_ID]); // reset PROPFIND_COUNT $this->resetProfindCount(); |