mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-02 06:46:22 +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
|
@override
|
||||||
canPickDir(File dir) {
|
canPickDir(File dir) {
|
||||||
|
if (widget.account.roots.contains("")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
final root = api_util.getWebdavRootUrlRelative(widget.account);
|
final root = api_util.getWebdavRootUrlRelative(widget.account);
|
||||||
return widget.account.roots
|
return widget.account.roots
|
||||||
.any((r) => dir.path == "$root/$r" || dir.path.startsWith("$root/$r/"));
|
.any((r) => dir.path == "$root/$r" || dir.path.startsWith("$root/$r/"));
|
||||||
|
|
Loading…
Reference in a new issue