Skip to content

Conversation

@TheBobBobs
Copy link
Contributor

Summary

Relative path was being used when updating thumbnails. This prevented "show in file explorer" and 'move to trash" from working.
Fixes #1133

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Linux x86
  • Tested For:
    • Basic functionality

Copy link

@Tishj Tishj left a comment

Choose a reason for hiding this comment

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

I've tested this

The workaround was to highlight the item, then use "Open file" on the thumbnail preview window, which goes through this path:

                filepath: Path = unwrap(self.lib.library_dir) / entry.path

                if update_preview:
                    stats: FileAttributeData = self.__thumb.display_file(filepath)
                    self.__file_attrs.update_stats(filepath, stats)
    def display_file(self, filepath: Path) -> FileAttributeData:
        """Render a single file preview."""
        self.__current_file = filepath

Gets actually opened here:

    def _open_explorer_action_callback(self):
        open_file(self.__current_file, file_manager=True)

which comes from:

        open_file_action = QAction(Translations["file.open_file"], self)
        open_file_action.triggered.connect(self._open_file_action_callback)
        open_explorer_action = QAction(open_file_str(), self)
        open_explorer_action.triggered.connect(self._open_explorer_action_callback)

Seeing as that also has unwrap, it makes sense that this is the fix here

@CyanVoxel CyanVoxel added Type: UI/UX User interface and/or user experience Type: File System File system interactions labels Sep 23, 2025
@CyanVoxel CyanVoxel added this to the Alpha v9.5.6 milestone Sep 23, 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.

Thank you so much for the fix!

@CyanVoxel CyanVoxel merged commit 1981b13 into TagStudioDev:main Sep 23, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: File System File system interactions Type: UI/UX User interface and/or user experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Show in File Exlorer not Working

3 participants