Skip to content
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

"Show in File Manager" not working #1169

Open
archaeojsc opened this issue Nov 25, 2024 · 1 comment
Open

"Show in File Manager" not working #1169

archaeojsc opened this issue Nov 25, 2024 · 1 comment

Comments

@archaeojsc
Copy link

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

@shiftkey
Copy link
Owner

shiftkey commented Feb 9, 2025

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

shell.openPath(pathname).then(err => {
if (err !== '') {
log.error(`Failed to open directory (${path}): ${err}`)
}
})

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants