Review Request: Don't append "0-" when dragging and dropping from trash

David Faure faure at kde.org
Sat Nov 10 21:41:41 GMT 2012



> On June 19, 2012, 5:55 a.m., David Faure wrote:
> > Good idea, but it seems to break the case where nested dirs exist in the directory being restored. Everything gets flattened out. Probably a bug in CopyJob though, in the handling of fileNameUsedForCopying=DisplayName
> 
> Michael Reeves wrote:
>     From what I can tell when moveAs or copyAs is called CopyJob doesn't use the UDSEntry information to determine the destination path. Why I don't know.
> 
> Michael Reeves wrote:
>     I found a possible solution if the trash id could some how be determined without having it in the URL. I have this setup working with the trashId hard coded to 0 and fileNameUsedForCopying=Name. Obviously not suitable for general use I only have one trash folder so I this works for me. Who would have more information on CopyJob? I would prefer not to mess with the URL if it can be avoided.

The trashId has to be in the URL, it's the only way to deal with duplicates. You could have trash:/0-foo and trash:/1-foo, due to deleting a file called "foo" in two different partitions, each with their trash dir. kio_trash wants to present a unified view of all trash dirs, this is where this comes from. But I'm all for hiding it as much as possible.

I'll look into CopyJob once you fix the kio_trash change. Deal? :-)


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105078/#review14874
-----------------------------------------------------------


On June 18, 2012, 5:39 p.m., Michael Reeves wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105078/
> -----------------------------------------------------------
> 
> (Updated June 18, 2012, 5:39 p.m.)
> 
> 
> Review request for KDE Runtime.
> 
> 
> Description
> -------
> 
> This patch makes drag-and-drop and cut/paste from trash preserve the orginal filename instead of appending "0-".
> 
> 
> This addresses bug 183403.
>     http://bugs.kde.org/show_bug.cgi?id=183403
> 
> 
> Diffs
> -----
> 
>   kioslave/trash/kio_trash.cpp 4187f45 
>   kioslave/trash/trash.protocol f96d4a1 
> 
> Diff: http://git.reviewboard.kde.org/r/105078/diff/
> 
> 
> Testing
> -------
> 
> I have used the modified io_trash module on my machine since before the KDE 4.8 release and still use it under KDE 4.8.3.
> 
> 
> Thanks,
> 
> Michael Reeves
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20121110/f5935269/attachment.htm>


More information about the kde-core-devel mailing list