Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Thu, 5 May 2005 14:05:53 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: mkdir -p and network drives Message-ID: <20050505180553.GJ5374@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i On Thu, May 05, 2005 at 06:44:05PM +0100, Dave Korn wrote: >----Original Message---- >>From: Igor Pechtchanski >>Sent: 05 May 2005 18:20 > >> On Thu, 5 May 2005, Paul Eggert wrote: >> >>> Eric Blake writes: >>> >>>> //MACHINE currently generates ENOENT, whether or not there is a >>>> server on the network with that name, and mkdir(2), stat(2), and >>>> chdir(2) with an argument of "//MACHINE" fail. >>> >>> That's certainly a hassle. Let's not worry about going through >>> zillions of lines of application code working around that >>> incompatibility. Let's get Cygwin fixed instead. >> >> One potential problem is that on Windows, using NetShareEnum when checking >> the path will mean that every time someone does "mkdir -p", the command >> will have to wait until all network shares are examined. This could >> result in quite a bit of a delay, to say the least... > >Um, I don't see why. You only need to check network shares at all when >you have "//" at the start of the command line. I can't see any reason >why you'd want to check shares on any machine other than //MACHINE >either, and in fact I can't see why you'd care about checking any share >on //MACHINE other than the one specified after '//MACHINE/' in the >command line. Could you perhaps expond on that statement a bit? I don't know precisely how mkdir works but if it does something like: 1) Does '//' exist? 2) Does '//MACHINE' exist? 3) Does '//MACHINE/x' exist? Step 1 would work since '//' is the root directory. Step 2 could be looked up as a hostname. Step 3 could be determined via normal filename tests. I don't see why it should be necessary to iterate over every available share either. The problem is that //MACHINE isn't really a directory. You can't cd to it. You can't create stuff under it. If it was really going to be supported, we could make cygwin treat this as a special case but, as I said, this isn't trivial. To *really* fully support '//' would be interesting. Should all of the machines in the network show up if you do a "ls //"? I think not, although it would be sort of nifty to be able to cd to some directory and get a listing of all of the available machines on your network. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/