From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: patch about moving file (or directory) to the Recycle Bin on Windows NT series Date: Tue, 22 Apr 2008 21:14:30 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208913290 7720 80.91.229.12 (23 Apr 2008 01:14:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Apr 2008 01:14:50 +0000 (UTC) Cc: Toru TSUNEYOSHI , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 23 03:15:25 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JoTa1-0003Dq-GI for ged-emacs-devel@m.gmane.org; Wed, 23 Apr 2008 03:15:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JoTZL-0004i7-Ic for ged-emacs-devel@m.gmane.org; Tue, 22 Apr 2008 21:14:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JoTZH-0004h1-C1 for emacs-devel@gnu.org; Tue, 22 Apr 2008 21:14:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JoTZF-0004df-6K for emacs-devel@gnu.org; Tue, 22 Apr 2008 21:14:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JoTZE-0004dK-Ub for emacs-devel@gnu.org; Tue, 22 Apr 2008 21:14:36 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182] helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JoTZB-0006rT-8H; Tue, 22 Apr 2008 21:14:33 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah4CAHMqDkjO+KGddGdsb2JhbACBUpACASqbLw X-IronPort-AV: E=Sophos;i="4.25,696,1199682000"; d="scan'208";a="18899188" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 22 Apr 2008 21:14:30 -0400 Original-Received: from pastel.home ([206.248.161.157]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id DFL70330; Tue, 22 Apr 2008 21:14:30 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 73ADA8066; Tue, 22 Apr 2008 21:14:30 -0400 (EDT) In-Reply-To: (Eli Zaretskii's message of "Tue, 22 Apr 2008 21:19:09 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:95814 Archived-At: >> + /* On Unix, unlink works without write permission. */ >> + _chmod (path, 0666); > Can this somehow leave the file writable without deleting it, if the > code is interrupted before it gets to undo this _chmod call? If so, > we need to guard against that somehow. Also that makes the file temporarily readable/writable by everybody. It's probably better to set it to 0600. Of course, maybe this is irrelevant because of the way w32 interprets those Unix-style permissions. Stefan