mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-08 18:28:53 +01:00
Fix unpicking wrong parent dir
This commit is contained in:
parent
df26b7a8c8
commit
2472f839e8
1 changed files with 2 additions and 1 deletions
|
@ -314,7 +314,8 @@ mixin DirPickerMixin<T extends StatefulWidget> on State<T> {
|
||||||
"[_pickedAllExclude] Unpicking '${item.file.path}' and picking children");
|
"[_pickedAllExclude] Unpicking '${item.file.path}' and picking children");
|
||||||
final products = <LsDirBlocItem>[];
|
final products = <LsDirBlocItem>[];
|
||||||
for (final i in item.children ?? []) {
|
for (final i in item.children ?? []) {
|
||||||
if (exclude.file.path.startsWith(i.file.path)) {
|
if (exclude.file.path == i.file.path ||
|
||||||
|
exclude.file.path.startsWith("${i.file.path}/")) {
|
||||||
// [i] is a parent of exclude
|
// [i] is a parent of exclude
|
||||||
products.addAll(_pickedAllExclude(item: i, exclude: exclude));
|
products.addAll(_pickedAllExclude(item: i, exclude: exclude));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue