diff --git a/lib/Controller/FolderController.php b/lib/Controller/FolderController.php index 56e7989d..6ed42101 100644 --- a/lib/Controller/FolderController.php +++ b/lib/Controller/FolderController.php @@ -161,7 +161,7 @@ private function getRootFolderStorageId(): ?int { * @NoAdminRequired */ public function addFolder(string $mountpoint): DataResponse { - $id = $this->manager->createFolder($mountpoint); + $id = $this->manager->createFolder(trim($mountpoint)); return new DataResponse(['id' => $id]); } @@ -185,7 +185,7 @@ public function removeFolder(int $id): DataResponse { * @RequireGroupFolderAdmin */ public function setMountPoint(int $id, string $mountPoint): DataResponse { - $this->manager->setMountPoint($id, $mountPoint); + $this->manager->setMountPoint($id, trim($mountPoint)); return new DataResponse(['success' => true]); } @@ -277,7 +277,7 @@ public function renameFolder(int $id, string $mountpoint): DataResponse { if ($response) { return $response; } - $this->manager->renameFolder($id, $mountpoint); + $this->manager->renameFolder($id, trim($mountpoint)); return new DataResponse(['success' => true]); }