Skip to content

fix: folders with names of unlinked entries are linked #1027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

purpletennisball
Copy link
Contributor

Summary

Fixes #989

When a unlinked entry has a folder with the same name:

  • It can’t be deleted.
  • It can’t be opened or revealed
  • The thumbnail will show as unlinked
  • File stats are hidden.
  • Considered as unlinked in the Fix Unlinked Entries menu (which was the behaviour even before this PR)

Let me know if there is any changes you would like me to make :)

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality
    • PyInstaller executable

@CyanVoxel CyanVoxel added Type: Bug Something isn't working as intended TagStudio: Library Relating to the TagStudio library system labels Aug 11, 2025
@CyanVoxel CyanVoxel moved this to 👀 In review in TagStudio Development Aug 11, 2025
@CyanVoxel CyanVoxel added this to the Alpha v9.5.4 milestone Aug 11, 2025
Copy link
Member

@CyanVoxel CyanVoxel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like everything that's here fixes the specific areas they target, but there's still a few circumstances left that should be addressed before #989 should be considered closed:

  • The relink process still does not check if a file is a folder when relinking
  • Various methods in ThumbRenderer and PreviewThumb such as _image_thumb() will crash the program or throw a traceback if trying to render a thumbnail for a file that's been swapped with a folder of the same name, most notably _image_thumb() in my testing

@purpletennisball
Copy link
Contributor Author

It looks like everything that's here fixes the specific areas they target, but there's still a few circumstances left that should be addressed before #989 should be considered closed:

  • The relink process still does not check if a file is a folder when relinking

  • Various methods in ThumbRenderer and PreviewThumb such as _image_thumb() will crash the program or throw a traceback if trying to render a thumbnail for a file that's been swapped with a folder of the same name, most notably _image_thumb() in my testing

I thought there may have been some stuff I missed. 🤔 I'll work on those changes as soon as I can. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TagStudio: Library Relating to the TagStudio library system Type: Bug Something isn't working as intended
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

[Bug]: Creating a folder with the name of an unlinked entry considers it linked
2 participants