Skip to content

Commit

Permalink
check in addition for folder existence at FolderManager
Browse files Browse the repository at this point in the history
Co-authored-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy and juliusknorr committed May 10, 2023
1 parent a9ccad0 commit 4911524
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Controller/FolderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ private function checkFolderExists(int $id): ?DataResponse {
if ($storageId === null) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
$folder = $this->manager->getFolder($id, $storageId);
if ($folder === false) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
return null;
}

Expand Down

0 comments on commit 4911524

Please sign in to comment.