Fix potential deadlock listing albums

This commit is contained in:
Ming Ming 2021-07-19 01:16:57 +08:00
parent 0e8a461a0f
commit 7d078b5a8d

View file

@ -37,12 +37,13 @@ class ListAlbum {
File(
path: remote_storage_util.getRemoteAlbumsDir(account),
));
} catch (e) {
} catch (e, stacktrace) {
if (e is ApiException && e.response.statusCode == 404) {
// no albums
return;
}
rethrow;
yield Tuple2(e, stacktrace);
return;
}
final albumFiles =
ls.where((element) => element.isCollection != true).toList();