Dolphin shows an empty folder when I open file CHANGES.gz Reproducible: Always Steps to Reproduce: 1. Tell Dolphin to navigate to <URL: file:///usr/share/doc/packages/rpm/ >. 2. Tell Dolphin to open CHANGES.gz 3. Actual Results: 1. CHANGES.gz 2. An empty folder at <URL: gzip:/usr/share/doc/packages/rpm/CHANGES.gz/ > Expected Results: 2. Let Dolphin pass <URL: gzip:/usr/share/doc/packages/rpm/CHANGES.gz > to Konqueror, which is the only application capable of reading the gzip input slave.
Interestingly, it shows "Open with Ark" as default action in the context menu. Kate/KWrite, btw, knows to open compressed files, and clicking on CHANGES.gz could open it, if it is the default text file association. Thinking about it, clicking on .gz (or any other compressed file, for that matter) could also try to find the MIME type of the uncompressed file (if possible, by simply omitting the .gz extension, so that .tar.gz is detected as an archive), and call the application associated with that format directly, if it supports compressed files, otherwise decompress to /tmp and open the temporary file (like we do with remote files). Bonus if it recompresses the result if changed :) But that's more of a KIO feature for KF5 or 6.
Created attachment 83894 [details] Add some debug output I cannot reproduce the problem (kde-baseapps master built on top of kdelibs 4.10.5 with some hacks). Dolphin opens Ark here when trying to open that file. I haven't tested it with a more recent kdelibs yet. If it does indeed not work with kdelibs 4.11 or later, we should probably reassign this report. When trying to open CHANGES.gz, the patch generates the following output: ### MIME type for "CHANGES.gz" : "application/x-gzip" # No protocol found! Since no protocol for opening the file in Dolphin is found, it does not try to open the file itself, but falls back to the default application Ark. When trying to open a .tar.gz file, the output is: ### MIME type for "a.tar.gz" : "application/x-compressed-tar" # Protocol: "tar"
Frank! Tell Dolphin to open archives as directories first.
(In reply to comment #3) > Frank! Tell Dolphin to open archives as directories first. Thanks for the hint, but I had already figured that such a problem can only occur if archives are opened as directories, and had enabled that option before I wrote comment 2. (In reply to comment #1) > Thinking about it, clicking on .gz (or any other compressed file, for that > matter) could also try to find the MIME type of the uncompressed file (if > possible, by simply omitting the .gz extension, so that .tar.gz is detected > as an archive), and call the application associated with that format > directly, if it supports compressed files, otherwise decompress to /tmp and > open the temporary file (like we do with remote files). Bonus if it > recompresses the result if changed :) But that's more of a KIO feature for > KF5 or 6. Agreed. This sounds like a good idea, but it cannot be implemented in Dolphin without support from KIO.
This is what I get with patch applied on 4.12: ### MIME type for "unsinn.txt.gz" : "application/gzip" # Protocol: "gzip" Then it tries to open "gzip://home/pepo/unsinn.txt.gz" inside Dolphin and only displays empty view.
(In reply to comment #5) > This is what I get with patch applied on 4.12: > > ### MIME type for "unsinn.txt.gz" : "application/gzip" > # Protocol: "gzip" > > Then it tries to open "gzip://home/pepo/unsinn.txt.gz" inside Dolphin and > only displays empty view. Thanks. Well, I still cannot reproduce, even with Dolphin+kdelibs master. I get the MIME type "application/x-gzip", and an empty "protocol", as expected. It also works fine for me in the KDE 4.11.3 packages shipped by Opensuse 12.3 (i.e., Dolphin does not try to open the files "a.txt.gz" or "CHANGES.gz" internally, but opens them in Ark). Maybe the MIME type stuff in kdelibs depends on upstream packages that might be different on your system? I'm inclined to think that what you observe is not a Dolphin problem. A gzipped text file is technically not an archive, but just a single compressed file. Therefore, KProtocolManager::protocolForArchiveMimetype(mimetype) should return an empty string from my point of view. I'll reassign to kdelibs, even though it might be that the problem is in some other library that it depends on.
I have the same issue on OpenSuse 13.1 with KDE 4.13.0. .gz files are recognized as application/gzip with Ark as the default (and only) associated application. But on clicking on them, dolphin tries to open it itself using the URL gzip:/path/file.gz/ The opened URL is shown as empty.
Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone!
Dear Bug Submitter, This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand. Thank you for helping us make KDE software even better for everyone!