Skip to content

Commit

Permalink
fix(settings): create missing type folder if not found
Browse files Browse the repository at this point in the history
Signed-off-by: codewithvk <[email protected]>
  • Loading branch information
codewithvk committed Feb 12, 2025
1 parent e043aa0 commit c9b774d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Service/SettingsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,12 @@ private function getTypeFolder($type) {
throw new NotFoundException('Instance ID not found');
}
$rootFolder = $this->rootFolder;
$folder = $rootFolder->get('appdata_' . $instanceId . '/richdocuments' . '/' . $type);
try {
$folder = $rootFolder->get('appdata_' . $instanceId . '/richdocuments' . '/' . $type);
} catch (NotFoundException $e) {
$baseFolder = $this->appData->newFolder($type);
$folder = $rootFolder->get('appdata_' . $instanceId . '/richdocuments' . '/' . $type);
}
return $folder;
}

Expand Down

0 comments on commit c9b774d

Please sign in to comment.