Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion lib/Service/FolderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use OCP\IGroupManager;
use OCP\IL10N;
use OCP\IUser;
use OCP\Lock\LockedException;

class FolderService {
protected IAppData $appData;
Expand Down Expand Up @@ -50,11 +51,19 @@ public function getUserId(): ?string {
* @psalm-suppress MixedReturnStatement
* @throws NotFoundException
* @throws NotPermittedException
* @throws LockedException
*/
public function getFolder(): Folder {
$path = $this->getLibreSignDefaultPath();
$containerFolder = $this->getContainerFolder();
return $containerFolder->newFolder($path);
try {
/** @var Folder $folder */
$folder = $containerFolder->get($path);
} catch (NotFoundException) {
/** @var Folder $folder */
$folder = $containerFolder->newFolder($path);
}
return $folder;
}

/**
Expand Down
Loading