#49785·electron

`showItemInFolder` does not open correct item location when run in snap

Author: craxalCreated Feb 12, 2026Updated Sep 17, 2026
Labelsplatform/linuxbug :beetle:has-repro-repocomponent/shellstale39-x-y

Preflight Checklist

Electron Version

39.2.7

What operating system(s) are you using?

Ubuntu

Operating System Version

24.04

What arch are you using?

x64

Last Known Working Electron version

No response

Does the issue also appear in Chromium / Google Chrome?

No

Expected Behavior

showItemInFolder should do as advertised and open the folder location of an item. For example:

shell.openItemInFolder("/home/username/Downloads/file.txt");

This should open the file browser to the user's Download folder and select "file.txt".

Actual Behavior

When using Electron Fiddle or running from an uncompressed .tar.gz distribution, this works as expected.

However, when running from a standard (vs. classic) snap, the file browser opens to the user's home directory and no deeper. This happens even when the snap is connected to the :home slot, and should have permissions to open user directories.

Testcase Gist URL

No response

Additional Information

Based on #33804