From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Dangerous: delete-file deletes current directory as root!! Date: Sat, 12 Oct 2002 11:45:14 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200210111932.g9BJWc116729@rum.cs.yale.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1034437706 22804 127.0.0.1 (12 Oct 2002 15:48:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 12 Oct 2002 15:48:26 +0000 (UTC) Cc: pot@gnu.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 180OV6-0005vg-00 for ; Sat, 12 Oct 2002 17:48:24 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 180PKg-0006ox-00 for ; Sat, 12 Oct 2002 18:41:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 180OSu-0007JY-00; Sat, 12 Oct 2002 11:46:08 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 180OS4-0006sX-00 for emacs-devel@gnu.org; Sat, 12 Oct 2002 11:45:16 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 180OS3-0006sF-00 for emacs-devel@gnu.org; Sat, 12 Oct 2002 11:45:16 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10) id 180OS3-0006s9-00 for emacs-devel@gnu.org; Sat, 12 Oct 2002 11:45:15 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 180OS2-0007c6-00; Sat, 12 Oct 2002 11:45:14 -0400 Original-To: monnier+gnu/emacs@rum.cs.yale.edu In-reply-to: <200210111932.g9BJWc116729@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8542 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8542 Now, I'm not sure what `delete-file' should do. Should it mimic `unlink' or should it first check that it is not called on a directory ? I think delete-file should refuse to delete a directory. That operation is very risky, and anyone who really wants to do it probably will do it from the shell. I think if Emacs simply detects that it is a directory and signals an error, it would be fine.