Re: [RFC] Fix problems related to Mingw/DJGPP file names containing colons

Eli Zaretskii
2011-08-13T10:50:47Z

> From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> Cc: <gdb-patches@sourceware.org>
> Date: Sat, 13 Aug 2011 12:10:53 +0200
>
> > It's ugly and fragile, because the original name could be quoted.
>
> + /* Quote filenames containing ':' characters to avoid problems. */
> + if (strchr (filename, ':') != NULL && filename[0] != '"')
> + sprintf (canonical_name, "\"%s\":%d", filename, sal->line);
>
> The second condition already takes care of not
> quoting already quoted file names.

What if the original name already includes quote characters? That can
happen on Posix platforms.