GNU bug report logs - #885
dired deleting a file can delete the entire directory

Previous Next

Package: emacs;

Reported by: driabslg <at> yahoo.com

Date: Thu, 4 Sep 2008 13:00:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

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 885 in the body.
You can then email your comments to 885 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#885; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to driabslg <at> yahoo.com:
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: a a <driabslg <at> yahoo.com>
To: bug-gnu-emacs <at> gnu.org
Subject: dired deleting a file can delete the entire directory
Date: Thu, 4 Sep 2008 05:50:14 -0700 (PDT)
If you create a file whose filename is a double quotation mark and try to delete it in dired-mode, and if you say yes to the questions, the entire directory is deleted.

out <at> themovies:~% mkdir test
out <at> themovies:~% cd test
out <at> themovies:~/test% touch \"\"

Now in emacs dired-mode remove the file ""

  /home/out/test:
  total used in directory 24 available 263498424
  drwxr-xr-x   2 out out  4096 2008-09-04 08:28 .
  drwxr-xr-x 133 out out 20480 2008-09-04 08:28 ..
D -rw-r--r--   1 out out     0 2008-09-04 08:28 ""

Delete  (yes or no) yes
Recursive delete of ? (yes or no) yes
Killed dired buffer of , too (y or n) y

Instead of just removing the file, the entire directory /home/out/test is deleted.

The machine is running Ubuntu 7.10 (Gutsy), the version of emacs is 23.0.60.1, from
Alexandre Vassalotti's deb package with xft support:

deb http://ppa.launchpad.net/avassalotti/ubuntu gutsy main

% emacs-snapshot-gtk --version
GNU Emacs 23.0.60.1
Copyright (C) 2008 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

apt-cache policy emacs-snapshot
emacs-snapshot:
  Installed: 1:20080228-2~gutsy
  Candidate: 1:20080228-2~gutsy
  Version table:
 *** 1:20080228-2~gutsy 0
        500 http://ppa.launchpad.net gutsy/main Packages
        100 /var/lib/dpkg/status
     1:20070805-1ubuntu1 0
        500 http://archive.ubuntu.com gutsy/universe Packages
        500 http://us.archive.ubuntu.com gutsy/universe Packages



      





Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to driabslg <at> yahoo.com:
bug acknowledged by developer. Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: a a <driabslg <at> yahoo.com>
Cc: 885-done <at> debbugs.gnu.org
Subject: Re: dired deleting a file can delete the entire directory
Date: Fri, 05 Sep 2008 17:19:33 -0400
> If you create a file whose filename is a double quotation mark and try
> to delete it in dired-mode, and if you say yes to the questions, the
> entire directory is deleted.

I've checked in a fix.  Thanks.




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

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

Previous Next


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