Hi @Qiplex. Do correct me if I’m wrong, but it looks like Organize My Files is intended for files and directories inside the home directory. If that’s the case, it should not need classic confinement.
I can confirm that no directories are shown in both Ubuntu 16.04.4 and Solus. I’m not seeing any denials with snappy-debug.security scanlog organize-my-files and installing via snap install --devmode organize-my-files produces the same behaviour. This suggests the problem is not confinement.
How are you obtaining that default set of folders under the “Default Folder” and “Folders” headings?
The Desktop folder is not loaded correctly, which leads to broken UI. For me the problem looked like container isolation issue. That’s why I thought that classic confinement needed to overcome this.
Under “Folders” section the user adding folders manually via clicking on add-folder icon on top-left corner. Electron’s dialog.showOpenDialog used there.
Since dialog.showOpenDialog works correctly, but app.getPath(desktop) doesn’t its quite likely to be an Electron issue. I will do additional testing and update the issue with outcome.
The issue turned to be in $HOME variable rewritten by snap for security and isolation purposes:
HOME
This environment variable is re-written by snapd so that each snap appears to have a dedicated home directory that is a subdirectory of the real home directory.
Thanks for getting back to us. Since you prefer not to use $HOME, you might consider instead of fixing up the value that is in $HOME, simply using defaultdir = pwd.getpwuid(<uid of the calling user>)[5]