X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,TW_RG X-Spam-Check-By: sourceware.org Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: argv @-expansion with pathname containing spaces From: Denis Excoffier In-Reply-To: <20121220134242.GB24713@calimero.vinschen.de> Date: Thu, 20 Dec 2012 22:13:22 +0100 Message-Id: References: <20121219162048 DOT GA4564 AT qp9482> <20121220115536 DOT GA300 AT qp9482> <20121220134242 DOT GB24713 AT calimero DOT vinschen DOT de> To: cygwin AT cygwin DOT com 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id qBKLDi7b014362 On 2012-12-20 14:42, Corinna Vinschen wrote: > On Dec 20 12:55, Denis Excoffier wrote: >> On Thu, Dec 20, 2012 at 11:34:37AM +0100, Csaba Raduly wrote: >>>> H Denis, >>>> >>>> On Wed, Dec 19, 2012 at 5:20 PM, Denis Excoffier wrote: >>>>> >>>>> Hello, >>>>> >>>>> I try to use the @pathname feature (see >>>>> http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-at), >>>>> but it does not seem to work when pathname contains a space character. >>>>> >>>>> My test pathname is D:\Documents and Settings\myuser\Desktop\test; with >>>>> C:\Home\myuser\test it works perfectly. >>>>> >>>>> I have tried @"path name" or @'path name', @path\\ name, or even >>>>> @path" "name, with no interpretation of the @. >>>> >>>> Have you tried with '@D:\Documents and Settings\myuser\Desktop\test' ? >> Does not work. >>>> Have you tried with '@D:\Docume~1\myuser\Desktop\test' ? >> Does not work either, but @D:\Docume~1\myuser\Desktop\test >> (without the simple quotes) does work. However i don't see how to >> derive the 8.3 form from my original filename, using DOS only. >> >> For the moment, the best solution i have is to copy >> the original file into, say, %TEMP%\dummy.txt, hoping that %TEMP% >> will not contain any spaces: >> >> copy "%pathname%" %TEMP%\dummy.txt > nul > > In fact the @ expression was not allowed to be quoted, since the quoted > string was kept intact for a later call to glob(3). Unfortunately, the > insert_file function, which handles reading the DOS file given as @ > parameter doesn't handle quoting either. > > I applied a patch which allows a simple, quoted string after the @ > expression now. So this works: > > @"a b\foo" > > But this still won't work: > > "@a b\foo" > > The @ must be the first character in a word. I applied your change (http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/dcrt0.cc.diff?cvsroot=src&r1=1.437&r2=1.438) and it works wonderfully well. And @'a b\foo' also works. Thank you Corinna. > > Hope that helps, It does. Denis Excoffier. -- 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