If we have a zip or tar.gz archive, we can usually browse it like a folder. However, if the archive is named without an extension, we get the message 'invalid protocol' when we try to do this. However, the 'information' panel in Dolphin shows that it is correctly detected as having the relevant mime type. Steps to reproduce: 1. Create a folder. 2. Create two text files inside it. 3. Compress the folder as zip, naming it folder.zip, or something similar. 4. Observe that you can enter the archive like a folder and view the text files inside. 5. Now, rename the archive from 'folder.zip' to 'folder' (remove the extension). 6. Now, if you try to browse the archive in Dolphin Observed results: For zip archives without extension, it seems to enter the folder, but does not show the contents. For tar.gz archives without extension, it does not enter the archive, and gives the error 'invalid protocol'. Expected results: Archives which are detected as archives by mimetype should be handled in the same way, regardless of whether they have the appropriate extension. Possibly related: https://bugs.kde.org/show_bug.cgi?id=188989 , but this is about zip archives having a different extension, instead of having no extension. I'm not sure if this is a bug in Dolphin or kio, so I'm filing it under Dolphin.
I forgot to mention this: the 'extract' option also does not appear in the right-click context menu for archives which don't have an extension.
Very interesting find. KUrlNavigator is built so that it will seamlessly switch between browsing "real" folders and archives, when a URL is set, it checks for mime types and then has some special handling for ZIP and TAR archives. The interesting bit is that QMimeDatabase mimeTypeForUrl("zip:///home/kaiuwe/Downloads/test2.zip") correctly returns application/zip whereas the same file just renamed zip:///home/kaiuwe/Downloads/test2 returns application/octet-stream and then it exits out into a folder. (I don't know where exactly the mime type resolution happens as "zip" is not a local URL so it will probably ask KIO and then probably the archive KIO gets confused? I'm not very knowledgable about KIO internals) Re-assigning to KIO.
The behaviour has changed (but still does not work as expected). Now, instead of showing 'invalid protocol', it just appears to enter the zip archive (that is named without an appropriate extension) and says 'the folder is empty' (even if the archive is not empty). The 'Extract' option appears correctly (and works as expected) in the right-click menu. Operating System: Arch Linux KDE Plasma Version: 5.23.3 KDE Frameworks Version: 5.87.0 Qt Version: 5.15.2 Kernel Version: 5.15.2-arch1-1 (64-bit) Graphics Platform: X11 Processors: 8 × AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx Memory: 21.5 GiB of RAM Graphics Processor: AMD Radeon Vega 8 Graphics
*** Bug 400197 has been marked as a duplicate of this bug. ***