I have program icons on desktop, and if I drag and drop a data file to the program icon, I get an error window with title "Err...sma" and a cryptic message "Access denied to .". Drag and drop worked nicely on KDE4, and is really basic operation for a GUI desktop since the first Engelbart demo in 1968. Functionality is equivalent as "open with", or running program with data file as a parameter. Reproducible: Always Steps to Reproduce: 1. Click on a file with left mouse button to select it 2. Drag it to program icon 3. Release the mouse Actual Results: Error message "Access denied to ." Expected Results: Open the program with the data contained in the dragged file.
I can confirm also on master. What this bug report is about: 1. Have a folderview set to desktop:/ folder 2. Have a desktop file to an application there (eg. drag Kate from kickoff there and link here) 3. now drag a file onto the "Kate" icon in the folderview Instead of opening Kate with the file I just dropped, I get an error message saying "Access denied to ."
Problem lies here in foldermodel.cpp I suppose: if (file.readType() == QLatin1String("Link")) { dropTargetUrl = file.readUrl(); } else { dropTargetUrl = item.url(); } If the desktop file is a Link to another location it should offer to move/copy/link to that location or else move/copy/link to where the desktop file is (. being the current directory). It nowhere handles the case of dropping something onto an Application type desktop file
It does -- KIO::drop() is responsible for that.
Right, I can also reproduce with Dolphin. Either a bug in KIO or the desktop:/ kio slave. Re-assigning.
It creates a DropJob with URL QUrl("desktop:/org.kde.kate.desktop") which is then rewritten *somewhere* (I suspect the rewriteUrl thing in the desktop KIO slave) to QUrl("file:///home/kaiuwe/Schreibtisch//foo"), note the double slash. This ends up making QUrl::toLocalFile fail and return an empty QString in the DropJobPrivate::slotStart() so KDesktopFile::isDesktopFile returns false and it never actually tries to open the dropped file with the application.
Git commit f2772c4fe63944f71f797c0d34d2cdb37897a535 by David Faure. Committed on 16/06/2016 at 13:34. Pushed by dfaure into branch 'master'. Fix DnD onto desktop:/ app desktop file. We need to resolve from desktop:/ to file:/ so that DropJob can handle application .desktop files. M +1 -1 src/panels/folders/folderspanel.cpp M +1 -1 src/views/dolphinview.cpp http://commits.kde.org/dolphin/f2772c4fe63944f71f797c0d34d2cdb37897a535
Git commit a79cbce0fed06c64ea32cd540b4824662e3a7e9e by Kai Uwe Broulik. Committed on 27/06/2016 at 10:34. Pushed by broulik into branch 'Plasma/5.7'. [FolderModel] Use mostLocalUrl() to properly resolve desktop:/ URLs This fixes dropping files onto applications in the desktop:/ folder. FIXED-IN: 5.7.0 Differential Revision: https://phabricator.kde.org/D1915 M +2 -2 containments/desktop/plugins/folder/foldermodel.cpp http://commits.kde.org/plasma-desktop/a79cbce0fed06c64ea32cd540b4824662e3a7e9e