desktop icon indicating copy to clipboard operation
desktop copied to clipboard

"Show in File Manager" not working

Open archaeojsc opened this issue 1 year ago • 1 comments

The problem

With the latest up (v3.4.8-linux1) the "Show in File Manager" is not working. Clicking the button opens VS Code instead of file manager, but only if VS code is already running. Otherwise, does nothing.

Release version

v3.4.8-linux1

Operating system

Ubuntu 24.04

Steps to reproduce the behavior

  1. Open a repository in Github Desktop
  2. Click on "Show in File Manager"

Log files

2024-11-25.desktop.production.log

Screenshots

No response

Additional context

No response

archaeojsc avatar Nov 25 '24 18:11 archaeojsc

We wrap the openPath method on Electron here, so I'm not sure why it's defaulting to open a different program:

https://github.com/shiftkey/desktop/blob/cab1d2ca900ff21deb46539bd9501572d77da875/app/src/main-process/shell.ts#L27-L31

The docs suggest that:

Open the given file in the desktop's default manner.

Internally this wraps xdg-open, but I'm not sure how to dig deeper into this currently:

void OpenPath(const base::FilePath& full_path, OpenCallback callback) {
  // This is async, so we don't care about the return value.
  XDGOpen(full_path.DirName(), full_path.value(), true, std::move(callback));
}

https://github.com/electron/electron/blob/9199d5c610c399d612dd938c87e2a92de56ec68c/shell/common/platform_util_linux.cc#L340-L343

shiftkey avatar Feb 09 '25 18:02 shiftkey