qarmin / czkawka

Multi functional app to find duplicates, empty folders, similar images etc.
Other
19.61k stars 641 forks source link

empty directories aren't detected, if any parent starts with a dot #1158

Closed thomas725 closed 8 months ago

thomas725 commented 9 months ago

Bug Description ...

Steps to reproduce: have empty directories within an ext4 filesystem below the scanned folder, where one of the parents no matter if above scanned folder or between empty child and scanned folder, it won't be found / listed in a scan for empty folders.

In contrast, empty folders that don't have a parent starting with dot are found, and correctly filtered so only the highest parent that contains nothing but other empty folders is listed without any of it's children.

System

qarmin commented 9 months ago

Cannot reproduce with cli

image

Also cannot reproduce problem with gui

can you show folder/file structure that causes problems?

thomas725 commented 9 months ago

ah maybe it's caused by to deep folder structures instead, now I have another example where no dot is involved, that was just my first guess...

My current example the first empty folder is 11 deep, but even if I scan it's parent (10 deep) it doesn't find any empty folders.

qarmin commented 9 months ago

You are using gui or cli? Cli by default not excludes any folders, so results should be clearer. Gui disables by default multiple folders by exact name and also by wildcard

thomas725 commented 9 months ago

I'm using GUI, but I removed that list and it doesn't match any of the 11 folder involved. I guess I can try using CLI and see if the results differ, give me a minute.

thomas725 commented 9 months ago

okey so there's definitely a difference between cli & gui that's not explainable by that default "Excluded items" list that the GUI displays (and allows to empty but restores on every restart) = */.git/*,*/node_modules/*,*/lost+found/*,*/Trash/*,*/.Trash-*/*,*/snap/*,/home/*/.cache/*

I have a disk mount = /run/media/user/UUID/

Running this czkawka_cli empty-folders -d . when the working dir is that disk mount, It gives me those 2 folders: /run/media/user/UUID/1/2/3/4 /run/media/user/UUID/1/2/3/5

None of the 6 sanitized folder names (UUID,1,2,3,4,5) do match one of the gui's "Excluded items".

The gui gives an empty result when scanning for empty folders.

UPDATE: ahh! But now I found that both 4 & 5 contain children that are contained in that list! Clearing the list and rerunning the scan gave the same result as the CLI!

Can we somehow make that list empty by default for the GUI version?

qarmin commented 9 months ago

It's not really possible Currently, the list contains a few very basic items that most users wouldn't want to remove accidentally.

qarmin commented 8 months ago

Closing since this is expected behavior and can be easily adjusted in gui settings