When dolphin is executed with a parameter which happens to be a file, it will open a non existing directory and execute the file. This
patch changes the behaviour to instead select the file and open its parent directory.
This can occurr if you intentionally launch Dolphin with a file name as a parameter (without specifying --select), drag and dropping a file to its task bar icon or typing a file name instead of a directory at the url navigator.
This change is true for all files except archives, since due to a prior
patch(https://git.reviewboard.kde.org/r/119877/) all archives will be openened in a new tab.
Given that, I also propose a second change: To browse archives as a directory only when the appropriate setting("Open Archives as folders") is enabled.