Emulator Issues #12411
UI: "Open Containing Folder" may open executable in the previous folder
What's the problem? Describe what went wrong.
(Tested only on Windows)
Normally on Dolphin's UI, when right-clicking a game and selecting "Open Containing Folder", File Explorer would open the directory that the game is in.
But if the directory before that contains an executable (.bat or .exe) of the same name, then that file will be executed.
| |--game.iso // "Open Containing Folder" this game...
|--WiiGames.bat // ...and this file will be executed
What steps will reproduce the problem?
- In the same directory, create an executable file (.bat or .exe) and a directory of the same name (don't include the extension and the directory);
- In that directory just created, put a file that Dolphin can open (like a game ISO or a .dol file);
- Now on Dolphin add that directory in Config>Paths, so that you can "Open Containing Folder" it;
- Right-click>Open Containing Folder;
- File Explorer won't open: the executable will be executed.
Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.
Is the issue present in the latest stable version?
Didn't test. The bug may be related to Qt.
#1 Updated by SuperSamus about 2 months ago
I just tested on stable: the bug is also there.
I also tested on Linux, and it doesn't happen there. Probably the cause is that Bash unlike Windows doesn't execute a file if you don't specify its extension, and because directories are files you can't make them have the same name.
This issue can be replicated with the start command on Windows' cmd: if the argument is a folder it will be opened by File Explorer, if it's an executable it's executed, but if there are both on the same directory the executable has priority. I suppose that's what Dolphin's "Open containing folder" is using under the hood.