File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 2121use OCP \IGroupManager ;
2222use OCP \IL10N ;
2323use OCP \IUser ;
24+ use OCP \Lock \LockedException ;
2425
2526class FolderService {
2627 protected IAppData $ appData ;
@@ -50,11 +51,19 @@ public function getUserId(): ?string {
5051 * @psalm-suppress MixedReturnStatement
5152 * @throws NotFoundException
5253 * @throws NotPermittedException
54+ * @throws LockedException
5355 */
5456 public function getFolder (): Folder {
5557 $ path = $ this ->getLibreSignDefaultPath ();
5658 $ containerFolder = $ this ->getContainerFolder ();
57- return $ containerFolder ->newFolder ($ path );
59+ try {
60+ /** @var Folder $folder */
61+ $ folder = $ containerFolder ->get ($ path );
62+ } catch (NotFoundException ) {
63+ /** @var Folder $folder */
64+ $ folder = $ containerFolder ->newFolder ($ path );
65+ }
66+ return $ folder ;
5867 }
5968
6069 /**
You can’t perform that action at this time.
0 commit comments