Fix db file data source returning file instead of fd from share folder

This commit is contained in:
Ming Ming 2024-02-13 19:22:58 +08:00
parent 3c35a383c1
commit 91caf39184

View file

@ -208,8 +208,10 @@ class FileNpDbDataSource implements FileDataSource2 {
account: account.toDb(),
dir: File(path: shareDirPath).toDbKey(),
);
results.addAll(shareDirResults.map((e) => DbFileConverter.fromDb(
account.userId.toCaseInsensitiveString(), e)));
results.addAll(shareDirResults.where((f) => f.isCollection != true).map(
(e) => DbFileConverter.fromDb(
account.userId.toCaseInsensitiveString(), e)
.toDescriptor()));
} on DbNotFoundException catch (_) {
// normal when there's no cache
} catch (e, stackTrace) {