Created attachment 3678 Working Patch When moving a file from a Thunar window to the desktop it fails with a message saying the file (the target) can not be found (or created) (I don't know the exact message in english because my locale is not english). How to reproduce: 1 - open a thunar window. 2 - drag a file to the desktop holding the shift key. 3 - the message appears. I think I've found the reason and a possible solution: It appears that when we copy the file to the desktop, the xfdesktop has to send the target file full path over DBus for thunar to copy the file. This is working as expected. BUT, if we move the file to the desktop, xfdesktop should send just the target directory where the file will be moved INTO. And, as I've found, when moving the files, the xfdesktop still sends the full destination path, this way Thunar appends the file base name to the already correct full path, causing the error. To solve that, I've put a condition that checks if it's a copy or move operation and then sends the correct target path. I'm not sure if it's a fix or just a workaround, but it works... :) --- System Info Distro: Arch Linux (amd64) Thunar Version: 1.2.1 Xfdesktop Version: 4.8.2 ---
Looks good, except that I'd only allocate dest_file if we really need to. But I can fix that when applying the patch.
Nice, I hope it helps. :)
Tested it and it works, thanks! I pushed it to master: commit 6bfb354ad75e292c15f29a73c357c131485c3aff Author: Jannis Pohlmann <jannis@xfce.org> Date: Fri May 20 01:51:35 2011 +0200 Fix moving files to the desktop with shift & drag (bug #7629). Patch provided by Patrick Melo <patrickmelo.eti@gmail.com>.
I also applied the same fix to the xfce-4.8 branch, so xfdesktop 4.8.3 will include it.
*** Bug 7891 has been marked as a duplicate of this bug. ***