X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 2 Jul 2010 15:28:03 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Weird directories on Windows share when using rm to delete a directory Message-ID: <20100702132803.GB8163@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4C2D0872 DOT 9080306 AT redhat DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4C2D0872.9080306@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Note-from-DJ: This may be spam On Jul 1 15:28, Eric Blake wrote: > On 07/01/2010 03:24 PM, Slide wrote: > > I am seeing a VERY odd problem. If I run "/usr/bin/rm -rf > > //computer/share/path/to/dir" to remove a directory on a network > > share. I get some directories created with names like > > .XXXfffff8a0015e3b00c65f07a9f20c7a31 at the ROOT of the share (where > > XXX is unprintable character with the value 0x3f). I ran the command > > with strace, but didn't see anything in there that would point to why > > the directory is created. > > > > If I run the corresponding Windows command "rmdir /s /q > > \\computer\share\path\to\dir" I do NOT see the same thing occur, so > > something in Cygwin is causing this issue. I am running Cygwin 1.7 > > updated today. > > This is due to cygwin emulating the ability to delete a file that is > still open. Since windows doesn't directly allow it, cygwin instead > renames it out of the way, and relies on windows delete-on-close > semantics to get rid of that temporary name after everything finally > lets go of the file. But if the delete-on-close stuff isn't working for > your particular network share, [...] Sorry Eric, but that's not the problem. Cygwin does what you say *only* for local drives. It utilizes the recycle bin directory of local drives for this mechanism. Remote shares usually don't have a recycle bin and for the unlink() mechanism I decided at one point that I don't want to create Cygwin directories in the root of the share without being asked. So, removing in-use files on shares is not directly supported from within Cygwin. However, there are shares which support that on their own, either in the server or in the client. The above folder using that weird hex number is definitely one of them. Cygwin has no control over that. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple