Bug 427573 - Context menu in an empty directory does not contain "Open with..."
Summary: Context menu in an empty directory does not contain "Open with..."
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 20.08.1
Platform: Manjaro Linux
: NOR minor (vote)
Target Milestone: ---
Assignee: Dolphin Bug Assignee
Depends on:
Reported: 2020-10-12 07:18 UTC by Oto Šťáva
Modified: 2020-10-13 00:18 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.12


Note You need to log in before you can comment on or make changes to this bug.
Description Oto Šťáva 2020-10-12 07:18:13 UTC
The context menu opened in an empty directory does not have the "Open with..." entry, which could be used e.g. to open an application like VSCode in it.

1. Create an empty directory
2. Open it in Dolphin so that the view is blank
3. Right-click the blank Dolphin view

There is no "Open with..." entry in the context menu.

I would expect an "Open with..." entry to be present so that I can open the empty directory in an application like VSCode to start creating new content in the directory.

Linux/KDE Plasma: Manjaro Linux testing
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1

When an empty directory is right-clicked "from the outside", i.e. its icon in the view of its parent directory, the context menu does contain an "Open with..." entry.
Comment 1 Nate Graham 2020-10-12 15:48:50 UTC
This is currently intentional. We got complaints about showing the menu item for empty folders in the past so we changed it in https://invent.kde.org/system/dolphin/-/commit/14f0cd52f61de7539e2d9c751966594708ed0281.

Elvis, what do you think? Should we revert that, or close this as INTENTIONAL?
Comment 2 vibhav kharangate 2020-10-12 20:49:02 UTC
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 {nav Open With} menu items for them

looks like above reasoning mentioned in the commit is proved false according to OP's use case. 

Reverting the commit would be recommended IMO
Comment 3 Elvis Angelaccio 2020-10-12 20:55:17 UTC
Yeah we should probably revert it, since there is a valid use case that is prevented from that commit.
Comment 4 Nate Graham 2020-10-13 00:05:06 UTC
All right, will do.
Comment 5 Nate Graham 2020-10-13 00:18:19 UTC
Git commit b343fdffc52ff42d83afa02f6eaf1f5a359a49a9 by Nate Graham.
Committed on 13/10/2020 at 00:16.
Pushed by ngraham into branch 'master'.

Show "Open With" menu items even for empty dirs

We found some legitimate use cases for this after all! :)

This reverts 14f0cd52f61de7539e2d9c751966594708ed0281
FIXED-IN: 5.12

M  +3    -5    src/dolphincontextmenu.cpp