Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 356683 - x11-misc/xfe deletes whole file structure if copy fails during move
Summary: x11-misc/xfe deletes whole file structure if copy fails during move
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-27 12:17 UTC by genbug
Modified: 2011-02-28 19:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
upstream patch to fix bug (xfe.patch,6.81 KB, text/plain)
2011-02-27 12:18 UTC, genbug
Details

Note You need to log in before you can comment on or make changes to this bug.
Description genbug 2011-02-27 12:17:13 UTC
xfe uses copy/delete instead of mv to move directories. If the initial copy fails, a message is briefly flashed up but the error is not trapped resulting in the delete still taking place. 

Any part of the directory heirarchy not already copied is then deleted. Gone. 

This is recognised by upstream and will be corrected in next release. There will not be a release beforehand to correct this issue. 

The patch here was provided by the upsteam maintainer as a fix to 1.3.2

Due to the severity of the bug it would seem a good idea to add this to portage. 


Reproducible: Always

Steps to Reproduce:
1.drag a dir to somewhere where the copy will fail. (eg no space left)
2.
3.

Actual Results:  
copy incomplete, src dir deleted.

Expected Results:  
no data loss.
Comment 1 genbug 2011-02-27 12:18:53 UTC
Created attachment 264037 [details]
upstream patch to fix bug

patch provided by Roland Baudin to address this issue. Patch for xfe-1.3.2

untested on 1.3.1
Comment 2 Kevin McCarthy (RETIRED) gentoo-dev 2011-02-28 14:50:15 UTC
I was unable to duplicate this behavior. If I move a directory to a filesystem that is not large enough to hold it, I get a pop-up window informing me of the problem. If I hit "Cancel" no files are lost. 

If I repeatedly click "OK", for each file that was unable to be moved, I can cause it to destroy the original directory. Unfortunately, this patch does not improve the situation. I can still destroy the original directory by clicking "OK", even with this patch applied.

Can you please provide a link to the upstream bug, or to the source of the patch? I can't find any info about it on the upstream sf.net page, even after a thorough search of the bug/patch trackers and the open discussion forum.

Thanks
Comment 3 genbug 2011-02-28 16:12:16 UTC
I found the message box only stayed visible for a second. I did not even have time to read what it said. 

I reported the bug directly to the maintainer who confirmed and fixed it and provided me with the attached patch when requested. 

With the patch I get what you describe and have a chance to cancel before everything gets blown out.

There may be some window manager element to it as well if you get different results. I found this on fvwm.

If you want it direct from the horses mouth I suggest you contact him.

roland65@free.fr
Comment 4 Kevin McCarthy (RETIRED) gentoo-dev 2011-02-28 18:24:37 UTC
Ok, I have added xfe-1.32.2-r1.ebuild to the portage tree. Since it doesn't seem to break anything, I guess it is fine to add this patch. Would you mind testing it on your system, since I can't seem to duplicate the error? Just respond to this bug and let me know if -r1 still has the issue or not.

Thanks
Comment 5 genbug 2011-02-28 19:38:21 UTC
I have already tested the patch by adding an epatch line in my overlay before submitting. 

It does fix the problem.
Comment 6 genbug 2011-02-28 19:38:53 UTC
fixed.