From 0737ef4cdaf7017f40be168a3fd4e261ce3fa06b Mon Sep 17 00:00:00 2001 From: darken Date: Wed, 21 Aug 2024 13:36:59 +0200 Subject: [PATCH] AppCleaner: Throw error if exclusions are larger than before --- .../sdmse/appcleaner/core/scanner/PostProcessorModule.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/eu/darken/sdmse/appcleaner/core/scanner/PostProcessorModule.kt b/app/src/main/java/eu/darken/sdmse/appcleaner/core/scanner/PostProcessorModule.kt index 843ddb7d5..6ee081e35 100644 --- a/app/src/main/java/eu/darken/sdmse/appcleaner/core/scanner/PostProcessorModule.kt +++ b/app/src/main/java/eu/darken/sdmse/appcleaner/core/scanner/PostProcessorModule.kt @@ -131,6 +131,10 @@ class PostProcessorModule @Inject constructor( log(TAG) { "After checking exclusions: $after" } } + if (after.itemCount > before.itemCount) { + throw IllegalStateException("Item count after exclusions can't be greater than before!") + } + return after }