allusion-app / Allusion

A free and open source desktop application for managing your visual library
GNU General Public License v3.0
662 stars 42 forks source link

Issue with excluding folders also excluding files outside of the folder #618

Open Xigzagamer opened 6 months ago

Xigzagamer commented 6 months ago

Describe the bug Excluding a folder can cause images outside of that folder to be excluded under specific circumstances. Basically let's say I name the folder "A" and I have a file named "AB" in the same parent folder. When I exclude folder A, file AB is also excluded because it contains the name of folder A, despite not being inside folder A.

An alternate description with more realistic names is if I have a folder called "Mario" and a picture outside of it called like "Mario and Luigi". If I exclude the Mario folder, then Allusion can't see the Mario and Luigi picture because it contains "Mario".

This issue is relatively easy to work around, but only if you know it exists. It also requires you to be very careful about the names of your folders and files to ensure that no folders have names simple enough to be contained by files within the same parent folder.

To Reproduce Steps to reproduce the behavior:

  1. Have a file that contains the name of a folder inside of the same folder.
  2. Hit the exclude button on the folder.
  3. Check to see if the file is still visible in Allusion.
  4. The file will not be visible despite not being inside of the excluded folder.

Expected behavior The file would be visible as it is not inside of the excluded folder.

Screenshots For comedic effect I decided to put a folder named "King" in the same folder as 2 characters with the word "King" in their name. Excluding that folder excluded the images of the two characters. image image image image

Allusion version 1.0.0-rc.10

Desktop OS Windows 11

Additional context No other context, the issue is very straightforward, just hard to explain via writing.