! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Wrong file paste order
Status:
RESOLVED: FIXED
Severity:
trivial

Comments

Description Peter Zotov 2010-06-14 02:40:54 CEST
When I copy files from one directory and paste in another, they get copied in the reverse order: if there were, for example, three files named "File01", "File02", "File03", the latter will be copied first and so on. This is very annoying when trying to copy big files from remote location (e.g. movies over nfs or sshfs).
Comment 1 deep-sleeper 2011-01-23 11:42:02 CET
Same problem for me. Thunar seems to copy in order of how files are physically on the disc, not in the alphabetical order. Very very annoying bug, got to use Nautilus instead of Thunar to copy my files in the good order.
Comment 2 Peter Zotov 2011-01-23 13:04:54 CET
Created attachment 3395 
Patch which fixes this bug
Comment 3 Peter Zotov 2011-01-23 13:07:26 CET
A patch which modifies three letters. Hell, was that so hard to fix? I've spend around three minutes fixing that, and another hour setting up an XFCE development environment, as it's outdated in Debian testing/unstable (of course).
Comment 4 Jannis Pohlmann editbugs 2011-01-23 13:24:34 CET
Appending is not really an option as it results in an O(n^2) runtime of the loop. This can be fixed by iterating the source list backwards and prepending to the target list which results in O(2n).
Comment 5 Peter Zotov 2011-01-23 13:44:40 CET
Created attachment 3396 
Iterate the list backwards
Comment 6 Peter Zotov 2011-01-23 13:45:59 CET
The interesting fact is that it's still a three-letter patch. Do I miss something now (a hidden segfault maybe? I'm not very familiar with GObject stuff.)
Comment 7 Jannis Pohlmann editbugs 2011-01-23 13:58:30 CET
(In reply to comment #6)
> The interesting fact is that it's still a three-letter patch. Do I miss
> something now (a hidden segfault maybe? I'm not very familiar with GObject
> stuff.)

Well, you need to use 

  for (lp = g_list_last (files), ...

first to get the last element of the list. Otherwise, lp will point to the first element and lp->prev will be NULL immediately.

BTW, please don't be sarcastic about the triviality of the patch just because we did not get to fixing the bug yet. It's not even about time, this issue was simply forgotten about. Yes, forgetting about bugs is one of the things that a bug tracker is supposed to solve but with too few developers and too many bugs there will always be some issues that will not be noticed.
Comment 8 Jannis Pohlmann editbugs 2011-01-23 14:06:58 CET
Fixed in xfce-4.8 and master. Will be part of the next bugfix and development releases of Thunar.
Comment 9 Peter Zotov 2011-01-23 14:20:19 CET
Oops, I've missed that somehow while testing the patch. It's nice to see this fixed anyway, thanks. (Thunar 1.2 is much better, as I see now; it'll take a while to see it in Debian, through).
Comment 10 Jannis Pohlmann editbugs 2011-01-23 14:29:18 CET
Thanks for not taking this to a personal level. I realize that this bug is (or was) very annoying despite the easy fix. Unfortunately, sometimes even issues like this simply slip through...
Comment 11 Lionel Le Folgoc 2011-10-21 14:47:39 CEST
*** Bug 5617 has been marked as a duplicate of this bug. ***

Bug #6504

Reported by:
Peter Zotov
Reported on: 2010-06-14
Last modified on: 2011-10-21
Duplicates (1):
  • 5617 copies mp3 files in random order

People

Assignee:
Jannis Pohlmann
CC List:
2 users

Version

Attachments

Patch which fixes this bug (1.30 KB, patch)
2011-01-23 13:04 CET , Peter Zotov
no flags
Iterate the list backwards (1.25 KB, patch)
2011-01-23 13:44 CET , Peter Zotov
no flags

Additional information