mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Fix no dirs can be picked if root dir is not set
This commit is contained in:
parent
f7e7a339f6
commit
89eaff4ea8
1 changed files with 3 additions and 0 deletions
|
@ -64,6 +64,9 @@ class _AlbumDirPickerState extends State<AlbumDirPicker>
|
|||
|
||||
@override
|
||||
canPickDir(File dir) {
|
||||
if (widget.account.roots.contains("")) {
|
||||
return true;
|
||||
}
|
||||
final root = api_util.getWebdavRootUrlRelative(widget.account);
|
||||
return widget.account.roots
|
||||
.any((r) => dir.path == "$root/$r" || dir.path.startsWith("$root/$r/"));
|
||||
|
|
Loading…
Reference in a new issue