Page 1 of 1

Serious bug that may cause data loss

Posted: 15 Mar 2012 15:19
by rhoelzl
I discovered a serious bug in the undo routine that might cause data loss (almost happened to me a few seconds ago):

Lets say we have two different files with the same filename, say file.txt in different directories, lets call them file A and file B and lets say they are located in directory A and B, respectively.

If I try to move file A into dir B, windows will show the "overwrite?"-prompt. One option I can choose is the option to keep both files, but to rename the new file.

If I choose this option, this is what I get in dir B:
file.txt <----- file B
file (2).txt <----- file A

So far so good.

But if I now choose undo for this move operation, XY does NOT move back "file (2).txt" into dir A and rename it back to "file.txt". Instead it moves file.txt to dir 1. So the two files are now interchanged.

This just happened to me, and I only noticed it in time because the file sizes of both files were very different.

Re: Serious bug that may cause data loss

Posted: 18 Sep 2012 11:46
by admin
Thanks, I'll check this.

(I found this thread by chance via google -- no idea how it could get unnoticed for such a long time. :oops: )

Re: Serious bug that may cause data loss

Posted: 18 Sep 2012 14:01
by admin
Cannot reproduce it. :? Magic fix?

Re: Serious bug that may cause data loss

Posted: 18 Sep 2012 15:58
by j_c_hallgren
admin wrote:(I found this thread by chance via google -- no idea how it could get unnoticed for such a long time. :oops: )
My bookmark is for "view active topics" and I read everything that is marked as new but sometimes when I go to "board index", I see threads that are unread...maybe that happened to you?

Re: Serious bug that may cause data loss

Posted: 18 Sep 2012 19:31
by rhoelzl
Hi,

just tried it. I can still reproduce the problem.

What I forgot to mention in the original post: The file in dir B will still be called "file (2).txt".

I suspect that the reason simply is that Windows "does not tell" XY how it resolved the overwrite situation, so XY simply does not have the necessary information to properly undo it.

Re: Serious bug that may cause data loss

Posted: 18 Sep 2012 19:43
by admin
Do you have a screenshot of this "overwrite?"-prompt?

Re: Serious bug that may cause data loss

Posted: 18 Sep 2012 19:58
by rhoelzl
Here you go.

Re: Serious bug that may cause data loss

Posted: 18 Sep 2012 20:00
by serendipity
I too can reproduce this.
BTW, custom copy is turned off, so the overwrite prompt is given by windows shell (not XY).
So i guess XY doesn't know that file.txt was renamed to file (2).txt (confirmed by rename missing in action log) So on undo XY is copying the file.txt back to folder A.

Re: Serious bug that may cause data loss

Posted: 18 Sep 2012 20:33
by admin
Correct explanation. I'm afraid I cannot do much about it. Windows gives me no way to know the new name.

BTW, I have never seen this windows prompt (probably because I work on XP all the time where you just get an overwrite yes/no prompt).

Re: Serious bug that may cause data loss

Posted: 18 Sep 2012 21:17
by serendipity
admin wrote:Correct explanation. I'm afraid I cannot do much about it. Windows gives me no way to know the new name.

BTW, I have never seen this windows prompt (probably because I work on XP all the time where you just get an overwrite yes/no prompt).
Hmmm... that's not good for Windows 7 users. So you suggest using custom copy? Is it the default on fresh XY install?

Re: Serious bug that may cause data loss

Posted: 19 Sep 2012 08:50
by admin
serendipity wrote:
admin wrote:Correct explanation. I'm afraid I cannot do much about it. Windows gives me no way to know the new name.

BTW, I have never seen this windows prompt (probably because I work on XP all the time where you just get an overwrite yes/no prompt).
Hmmm... that's not good for Windows 7 users. So you suggest using custom copy? Is it the default on fresh XY install?
No, it's not the default. I have to think about it...

Re: Serious bug that may cause data loss

Posted: 19 Sep 2012 16:00
by serendipity
admin wrote:
serendipity wrote:
admin wrote:Correct explanation. I'm afraid I cannot do much about it. Windows gives me no way to know the new name.

BTW, I have never seen this windows prompt (probably because I work on XP all the time where you just get an overwrite yes/no prompt).
Hmmm... that's not good for Windows 7 users. So you suggest using custom copy? Is it the default on fresh XY install?
No, it's not the default. I have to think about it...
OK thanks.

Re: Serious bug that may cause data loss

Posted: 20 Sep 2012 13:00
by admin
Victory! :mrgreen:

I have been trying this for years, and finally succeeded. HAR!

Re: Serious bug that may cause data loss

Posted: 20 Sep 2012 15:19
by serendipity
admin wrote:Victory! :mrgreen:

I have been trying this for years, and finally succeeded. HAR!
This is indeed nice. Thanks again.