Fix includeRelativeRoots and includeRelativeDirs not working in queryFileDescriptors when set together

This commit is contained in:
Ming Ming 2024-04-10 01:13:56 +08:00
parent 57c438b7f1
commit da00a4f3ad

View file

@ -456,12 +456,18 @@ extension SqliteDbFileExtension on SqliteDb {
for (final r in includeRelativeRoots) { for (final r in includeRelativeRoots) {
q.byOrRelativePathPattern("$r/%"); q.byOrRelativePathPattern("$r/%");
} }
}
}
if (dirIds != null) { if (dirIds != null) {
for (final i in dirIds) { for (final i in dirIds) {
q.byOrDirRowId(i); q.byOrDirRowId(i);
} }
}
}
} else {
if (dirIds != null) {
for (final i in dirIds) {
q.byOrDirRowId(i);
}
}
} }
if (location != null) { if (location != null) {
q.byLocation(location); q.byLocation(location);