Fix "go back" showing in top-level dir

This commit is contained in:
Ming Ming 2021-10-07 15:33:36 +08:00
parent 129f72e7fe
commit bc489ab954

View file

@ -57,7 +57,8 @@ class _AlbumDirPickerState extends State<AlbumDirPicker>
@override
getPickerRoot() {
final root = api_util.getWebdavRootUrlRelative(widget.account);
if (widget.account.roots.length == 1) {
if (widget.account.roots.length == 1 &&
widget.account.roots.first.isNotEmpty) {
return "$root/${widget.account.roots.first}";
} else {
return root;