[Feature]: Locate on Filesystem #116
Labels
No labels
Kind/Bug
Kind/Feature
Priority/High
Priority/Medium
Reviewed/Confirmed
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ai-collab/bulk-image-organizer#116
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem or use case
No way to locate the file being viewed
Proposed solution
On the grid, add "Reveal in Filesystem" to the right-click context menu to open the directory and highlight the image using the native OS directory explorer.
Alternatives considered
No response
Implemented on branch
0.2.4/issue-116-locate-filesystem(pushed, stacked on0.2.4/issue-131-next-unreviewed-button, awaiting PR tomain):core/reveal_in_filesystem.pybuilds the platform command:explorer /select,"<path>"on Windows; on Linux, the first detected of Nautilus, Dolphin, Nemo, or PCManFM (using each one's own "select" flag), falling back toxdg-openon the containing directory if none of those are installed; a trivialopen -Rfallback on macOS (non-goal platform, not polished further).subprocess.Popen, never waited on) so a slow/misbehaving file manager can't stall the UI. A missing file (deleted/moved since the last scan) is logged and skipped rather than raising.Added
tests/test_reveal_in_filesystem.py(11 tests covering command construction per platform/tool and the missing-file/no-tool/OSError fallback paths). Full suite: 614 passed/1 skipped (up from 603 baseline), ruff clean,smoke-ui-exit.shclean. This is the fifth and final branch in the v0.3.0 tranche (VERSIONnow0.3.4).Fixed the Windows bug from testing, pushed to the same branch (
0.2.4/issue-116-locate-filesystem):Root cause:
subprocess.Popenon Windows reconstructs a list of args into a single command line vialist2cmdline(), which re-escapes the literal double quotes already wrapped around the path in the constructed/select,"<path>"argument.explorer.exe's own (non-shell) argument parser doesn't understand that escaping and silently falls back to opening the default folder (Documents) instead of selecting the file — reproducible on both a local directory and a network (UNC) path, since it's a pure command-line-construction bug, not a path-resolution one.Fix: pass the whole command as one pre-formed string on Windows instead of a list —
Popenuses a string command line verbatim with no re-quoting, which is the standard workaround for thisexplorer /select,quoting issue. macOS/Linux are unaffected (no shell-string reconstruction happens there).Still open pending PR/merge to
main.Closing — PR #144 is open against
main.