From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19449 invoked by alias); 13 Aug 2011 21:26:12 -0000 Received: (qmail 19441 invoked by uid 22791); 13 Aug 2011 21:26:12 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 13 Aug 2011 21:25:56 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id p7DLPicZ009452; Sat, 13 Aug 2011 23:25:44 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id p7DLPhb6010148; Sat, 13 Aug 2011 23:25:43 +0200 (CEST) Date: Sat, 13 Aug 2011 21:26:00 -0000 Message-Id: <201108132125.p7DLPhb6010148@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: pierre.muller@ics-cnrs.unistra.fr CC: eliz@gnu.org, tromey@redhat.com, gdb-patches@sourceware.org In-reply-to: <005101cc59f9$7e87a790$7b96f6b0$@muller@ics-cnrs.unistra.fr> (pierre.muller@ics-cnrs.unistra.fr) Subject: Re: [RFC] Fix problems related to Mingw/DJGPP file names containing colons References: <004901cc5907$85006320$8f012960$%muller@ics-cnrs.unistra.fr> <83vcu2wnvj.fsf@gnu.org> <83sjp6wmhb.fsf@gnu.org> <003c01cc59a1$49cc1520$dd643f60$%muller@ics-cnrs.unistra.fr> <83ei0pwpol.fsf@gnu.org> <005101cc59f9$7e87a790$7b96f6b0$@muller@ics-cnrs.unistra.fr> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-08/txt/msg00280.txt.bz2 > From: "Pierre Muller" > Date: Sat, 13 Aug 2011 22:42:16 +0200 > > > What if the original name already includes quote characters? That can > > happen on Posix platforms. > You are right, but we are saved by the fact > that colons are not allow on those platforms, isn't it? > (otherwise all lists of directories like in the PATH > environment variable would have a problem...) borodin$ touch : borodin$ ls -l : -rw-r--r-- 1 kettenis wheel 0 Aug 13 23:16 : Of course sane people wouldn't use it for exacty the reson you cite above. > But there might be some 'exotic' file systems that allow > both double-quotes and colons as valid characters in their > filenames. In those cases, we would be in trouble... borodin$ touch \" borodin$ ls -l \" -rw-r--r-- 1 kettenis wheel 0 Aug 13 23:20 " So it's not that exotic. Note however that I need to escape the double-quote to prevent the shell from interpreting it as a quote. Perhaps that's the solution here? If you use "quotation" as well as "escaping" you should be able to express anything you want on a command line.