Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
SystemCleaner "base path" behavior #2243
System Cleaner has some problem that may cause wrong deletion.
When i added one folder [/storage/emulated/0/.c] into basepath, systemcleaner will scan out [/storage/emulated/0/.cc], [/storage/emulated/0/.clipboard] and [/storage/emulated/0/.ccf5d48d821324d1a992687444a73464].
I think if someday i want to delete one folder [/storage/emulated/0/.c], sd maid can delete more folder/files that i don't want it delete.
So could you fix this problem?
If you create the filter from the Explorer, it will automatically add
I don't think adding a
I know that add / can delete content in folder and keep that folder.
I think this is more simple and straightforward.
You can add a setting that user can choose open/close this mechanic themeselves in sd maid. settings to care about those users.
Changing the filtering engine to require options is not a very clean approach. I would prefer to not modify the way filters work. It would be cleaner to rename "basepath" to "starts with" and add a new "basepath", but any new filter criterium costs scan speed.
We could change the explorer tool to have an option "whole folder" vs "content" and then it would automatically created the right filter as mentioned in #2243 (comment) this would make it less complex to create a filter.
At present this design could make user has more workloads.
Because if one user want to delete whole folder,he must add folder path into basepath and add folder name into name end with, if he doesn't do that, there always be possibility that sd maid could delete more folders which he doesn't want to delete,because user can't remember all folder/file names,sd maid could scan out some folder/file that he doesn't know to delete.
If basepaths too much,it will be a pain for him to do this work.
I have two ideas to reduce scan time,not sure if it will work.
Userfilter are composed of several factors,some factors have been added by user,some haven't.
If one factor hasn't been added.by user,is it possible that make sd maid believe this factor are not been coded into filter,and sd maid can scan this filter without using corresponding code of factor hasn't been added,in another word,make sd maid skip that code.
Not sure if you can change sd maid scanning code structure to make it happen.
Another idea is that you can make sd maid put added factors into one group,put unadded factors into another group backgroundly when user add paths.
When sd maid scan paths,it can scan added factors group and not scan unadded group.
I think second idea could spend more time.