Re: [RFC] new substitute path when loading feature

Daniel Jacobowitz
2008-05-15T19:18:40Z

On Thu, May 15, 2008 at 09:55:05PM +0300, Eli Zaretskii wrote:
> Well, the patch will certainly work with DOS-ish file names on a Posix
> host, but I'm worried about breaking file names that are perfectly
> valid on Posix filesystems, but which just happen to use colons and
> backslashes. I agree that a probability of meeting such file names on
> Posix platforms is miniscule, but this patch leaves the user no fire
> escape whatsoever when she does meet them.
>
> Can we please augment this with some minimal band-aid for when
> backslashes and colons are literally used in a file name? Something
> like a user option to disable this feature and use normal Posix
> file-name syntax? I figure this would be enough, since mixing object
> files compiled on Posix and Windows platforms should be _really_ rare.

To have trouble I think you'd need to have two files in a project
whose name only differed by slashes: e.g. "a\b.c" and directory "a"
and "a/b.c". Mistakenly thinking a path is relative might cause some
problems but I can't think of how they would manifest.

I'm happy to add the band-aid; do you have an idea of what to call it?
set strict-filenames?

> Will this work if the file name is encoded in UTF-8 or some other
> multi-byte encoding, btw? We do want to support those, don't we?

The POSIX parts will work in UTF-8, since no multi-byte UTF-8
characters contain printable 7-bit ASCII. Other encodings, or with
the tolower check, I don't know.

--
Daniel Jacobowitz
CodeSourcery