This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Fix problems related to Mingw/DJGPP file names containing colons
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: pierre dot muller at ics-cnrs dot unistra dot fr
- Cc: eliz at gnu dot org, tromey at redhat dot com, gdb-patches at sourceware dot org
- Date: Sat, 13 Aug 2011 23:25:43 +0200 (CEST)
- 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> <m34o1mlezb.fsf@fleche.redhat.com> <83sjp6wmhb.fsf@gnu.org> <003c01cc59a1$49cc1520$dd643f60$%muller@ics-cnrs.unistra.fr> <83ei0pwpol.fsf@gnu.org> <005101cc59f9$7e87a790$7b96f6b0$@muller@ics-cnrs.unistra.fr>
> From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> 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.