Any app that registers itself as able to open directories generally can't do anything
useful with an empty directory. So, don't show the Open With menu items for them.
Details
- Reviewers
elvisangelaccio - Group Reviewers
Dolphin - Commits
- R318:14f0cd52f61d: Don't show "Open With" menu items for empty directories
Before:
After:
The Open With items still appear for non-empty directories.
Diff Detail
- Repository
- R318 Dolphin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
What happens if the user wants to open this directory with another program e.g. Dolphin (root mode), Krusader... ?
Then they'll be using one of the file action plugins, e.g. the "Root Actions" plugin. Also, this is not exactly an activity we encourage.
Any app that registers itself as able to open directories generally can't do anything useful with an empty directory.
If I may offer a counter-example (rather late, I know), one category of applications that an "Open with" on an empty dir is quite useful for are code editors. The way many people start new projects, for example, is by creating a new dir (in Dolphin) and using "Open with" to open it in their editor (like VS Code).
I know this workflow can be re-created with an action (like the one for Konsole), but at least to me, "Open with" seems more intuitive for this.
Most code editors I'm aware of don't install MIME type handlers for directories though, so they don't even show up in the Open With menu by default. You would need to set that up yourself. However I can see how once you do, it could be very useful.