[BUG] Paths removed from the Excluded Folders list aren't removed
Describe the bug Paths removed from the Excluded Folders list aren't removed after clicking Apply Changes.
Version: v1.9.0 (updated today)
Tool: N/A
To Reproduce
- Settings > Excluded Folders > Add Folder (in my case I added a sub-path of a folder already in the list while testing this feature).
- Click Apply Changes at the top.
- Switch to e.g. Search view.
- Check that this exclusion works, e.g. Tools > Folders > Remove excluded images.
- Settings > Excluded Folders > Remove Folder to remove the folder added in step 1
- Click Apply Changes at the top.
- Switch to e.g. Search view.
- Switch back to Settings; the removed folder is back in the Excluded Folders list.
Expected behavior Folders removed from the Excluded Folders list should stay removed!
Affected Image(s) N/A
Screenshots No sure this is needed; hopefully the steps listed above are sufficient.
Additional context I had been trying to work out whether the Excluded Folders would ignore/remove images from all sub-folders of each excluded path. Under my main images folder, I have a "temp" folder with lots of sub-folders and want to exclude ALL of these; this didn't work as I expected so I added one of these child folders explicitly and confirmed that I was able to exclude images from that folder.
Hi, I've working on revamping the folder management.
Managing folders will be moved out of settings and into the Folder view
Exclulded folders will be managed through the folder treeview
I have a working build, if you need to fix your excluded folders. Would you like to try it?
I don't need to fix it, but I don't mind testing if you'd like!
I could even have a go at building from source. The README says to use dotNET 6.0 but the website says it is end-of-life. Is it worth trying dotNET 9.x?
I'd like to update at some point, it shouldn't break anything either, so go ahead.
Pushed my latest changes, feel free to try it out
It built OK using dotNET 9.x (latest):
> dotnet publish Diffusion.Toolkit\Diffusion.Toolkit.csproj -c Release -r win-x64 -o .\build --no-self-contained /p:PublishSingleFile=true /p:PublishReadyToRun=false /p:DebugType=None /p:DebugSymbols=false
Restore succeeded with 1 warning(s) in 3.8s
... <lots of warnings> ...
Build succeeded with 2333 warning(s) in 13.7s
Quick feedback from 3 mins testing:
I like the Folder hierarchy view & it's easy to right-click a folder to exclude it. It would be good to have a show/hide excluded folders option in the View menu, rather than just highlighting them in red.
I have a number of folders showing in the Folders list which don't exist on disk. Perhaps these are caused by old entries in my database for images that have been moved and re-imported. I tried clicking "remove" on these folders, but nothing happened.
EDIT:
Just checked the database directly to look at one of these examples. I can see an entry in the Folder table for Folder Id 2:
Id ParentId Path
2 54 <my_image_root_path>\dreamshaper_7_saved
54 0 <my_image_root_path>
However, there aren't any enties in the Image table with a Folder Id of 2.
Deleting the entries directly from the SQLlite database cleaned up the Folder view.
Thanks for testing! Having a second pair of eyes is a huge help! I guess I'll just have to take a look at that remove code again.
I'm thinking I can put a toggle in the folder treeview accordion header, next to refresh, that can toggle excluded folders. That will make it easier to use, but we can have it in the View menu in case it's not immediately obvious.
Can you share your fix please?