GNU bug report logs - #394
wdired-change-to-wdired-mode can cause file deletion

Previous Next

Package: emacs;

Reported by: xah lee <xah <at> xahlee.org>

Date: Thu, 12 Jun 2008 08:45:03 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 394 in the body.
You can then email your comments to 394 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#394; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to xah lee <xah <at> xahlee.org>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: xah lee <xah <at> xahlee.org>
To: bug-gnu-emacs <at> gnu.org
Subject: wdired-change-to-wdired-mode can cause file deletion
Date: Thu, 12 Jun 2008 01:39:07 -0700
In dired, do M-x wdired-change-to-wdired-mode.

Then, swap 2 files's names.

Emacs will ask if the first file should be overwritten. If answer  
yes, it'll be deleted, and it wont be renamed. i.e. you lose a file.

This can be reproduced if you created 2 files, one named A and other  
B. Then renamed them to B and A. (Possibly you will need to create 3  
files and rename in particular cycle depending on how emacs choose  
the order to rename... The key is to get emacs to prompte for the  
overwrite of a file that should be renamed to something else later.)

This behavior is slightly unexpected and caused me to retrieve from  
my backup disk. (the files are images and never edited, so it isn't  
in emacs's backup)

  Xah
∑ http://xahlee.org/

Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to xah lee <xah <at> xahlee.org>:
bug acknowledged by developer. Full text and rfc822 format available.

Message #10 received at 394-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 394-done <at> debbugs.gnu.org
Subject: Re: bug#394: wdired-change-to-wdired-mode can cause file deletion
Date: Sat, 14 Jun 2008 13:01:52 -0400
> In dired, do M-x wdired-change-to-wdired-mode.
> Then, swap 2 files's names.
> Emacs will ask if the first file should be overwritten. If answer yes, it'll
> be deleted, and it wont be renamed. i.e. you lose a file.

Indeed, dired's rename is a "parallel" rename, whereas our underlying
C primitives only offer sequential renaming, so we need to de more work
to handle those cases.

I've installed a patch into the CVS trunk which should fix it (or at
least catch the problem before it's too late).


        Stefan




bug archived. Request was from Debbugs Internal Request <don <at> donarmstrong.com> to internal_control <at> emacsbugs.donarmstrong.com. (Sun, 13 Jul 2008 14:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 346 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.