diff --git a/lib/widget/dir_picker_mixin.dart b/lib/widget/dir_picker_mixin.dart index abd5f821..22551f03 100644 --- a/lib/widget/dir_picker_mixin.dart +++ b/lib/widget/dir_picker_mixin.dart @@ -314,7 +314,8 @@ mixin DirPickerMixin on State { "[_pickedAllExclude] Unpicking '${item.file.path}' and picking children"); final products = []; 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 products.addAll(_pickedAllExclude(item: i, exclude: exclude)); } else {