Summary: | Weird handling of .directory files | ||
---|---|---|---|
Product: | [Unmaintained] kio | Reporter: | Malte S. Stretz <mss> |
Component: | general | Assignee: | David Faure <faure> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | adaptee, adrian, de.meyer.maarten, frank78ac, martin.zboril, nate, simonandric5 |
Priority: | NOR | ||
Version: | 4.13.2 | ||
Target Milestone: | --- | ||
Platform: | Chakra | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=194253 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Screenshot showing a non-existent green directory and the error message.
dot-directory file |
Description
Malte S. Stretz
2010-04-26 17:36:12 UTC
Thanks for the report, but I cannot reproduce this issue with KDE SC 4.5.0. Please reopen the report, if it still occurs in your environment. Nope, this is still present in KDE 4.5.0. I'll attach a screenshot to show what I mean. Qt: 4.7.0 KDE Development Platform: 4.5.00 (KDE 4.5.0) Dolphin: 1.5 Created attachment 51054 [details]
Screenshot showing a non-existent green directory and the error message.
Strange... Would it be possible that you provide step-by-step instructions how to reproduce this issue? I changed the icon of a folder and switched on hidden files in that directory, but cannot reproduce this issue. Created attachment 51061 [details]
dot-directory file
Of course. I also attached the generated .directory file.
1. Go to ~
2. Select File->Create New->Folder
3. Name it Test or whatever you like
4. Change into that (empty) folder
5. Enable View->Show Hidden Files (the .directory file is created)
6. Disable View->Preview
7. Right-Click into the white empty folder space, chose Properties
8. Click the icon to change the folders icon
9. Watch how the .directory file changes its icon, too
10. Click on that file and enjoy the error message :)
I also went into the File Associations KCM to find out what the default command for this should be. According to the properties is this a "desktop configuration file". When I type that into the search field, all I get with that description is application/x-desktop. But that MIME type has only the extensions *.desktop and *.kdelnk associated. And the Application Preference order is Kate, KWrite, OpenOffice.org Word Processor (WTF?). Dunno whats going on here. Should bug 194253 be merged into this report? Resetting assignee to default as per bug #305719 *** Bug 194253 has been marked as a duplicate of this bug. *** This is because dolphin doesn't create valid a desktop entry. Every .directory file should have a Type= and a Name= key. http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html Looks like the code is in viewproperties.cpp if somebody wants to try. Thanks Maarten for the information, and sorry for the late response. According to the specification, the valid values for the "Type" are Application, Link and Directory. If I add a "Type=..." line to the "[Desktop Entry]" group, I can never achieve that clicking the file results in opening it in KWrite, no matter if there is a "Name=..." line or not (tested with KDE SC 4.13.3 - note that no source code modification is needed at all for testing this because one can simply edit the .directory file in a text editor): For the type "Directory", I get an error message "The desktop entry of type Directory is unknown". For the type "Link", I get "The desktop entry file ... is of type Link but has no URL=... entry.". For the type "Application", nothing happens when clicking the .directory file. So I don't see what we can do about this problem, sorry about that. Note that the [Desktop Entry] group in the .directory file is actually not created by Dolphin at all. This is done by the Properties dialog, which is part of kdelibs. Without this group, the .directory file is just a regular text file, which can be opened just fine by clicking it. So I am not sure what to do with this report. Unless anyone has a good idea, we should probably reassign it to KIO (which could just treat the file as a text file instead of showing the error messages) or close it as WONTFIX (since we do not have a CANTFIX state). I'll reassign to KIO, where the error dialogs probably come from. I don't see anything we can do in Dolphin itself to fix this problem. Thank you for looking into this. I have patch for kio that I'll post soon. With my patch kio is able to handle .directory files as expected. The only remaining issue is that it has the same icon as the parent folder. I have not looked into solving that. Git commit 76eeb6a21c7553d65e02366837c742c1c91d295b by Maarten De Meyer. Committed on 21/08/2014 at 13:02. Pushed by demeyer into branch 'master'. Open .directory files as plain text. We cannot execute .directory files so we have to trick KRun in opening them as plain text. REVIEW: 119869 M +5 -0 src/widgets/kdesktopfileactions.cpp http://commits.kde.org/kio/76eeb6a21c7553d65e02366837c742c1c91d295b Can't reproduce any of the issues described in the original ticket with KDE Frameworks 5.45 and Dolphin 18.04. |