[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows file names snafu

From: Ludovic Courtès
Subject: Re: Windows file names snafu
Date: Mon, 30 Jun 2014 13:12:44 +0200
User-agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux)

Eli Zaretskii <address@hidden> skribis:

> This issue is caused by code that treats file names like strings.
> That fails when the compared strings differ by their directory
> separators ('/' vs '\').  I bumped into this in a couple of tests that
> failed or even aborted with backtrace.
> A related issue is the file names passed to Bash via open-pipe and
> friends: Bash treats backslashes as escape characters, so commands
> start to fail in mysterious ways.
> For these two reasons, I think Guile should strive to keep file names
> in Unix-compatible form, i.e. using forward slashes as directory
> separators.

I see, makes sense to me.

> The patch below is just to show what I modified; if this approach is
> accepted, I think it would be better, at least for the C parts of the
> patch below, to have a function to do the job, and call it from each
> of the few places which I identified.


> --- module/ice-9/boot-9.scm~  2014-02-15 01:00:33 +0200
> +++ module/ice-9/boot-9.scm   2014-06-29 18:15:07 +0300
> @@ -1657,7 +1657,7 @@
>         (or (char=? c #\/)
>             (char=? c #\\)))
> -     (define file-name-separator-string "\\")
> +     (define file-name-separator-string "/")
>       (define (absolute-file-name? file-name)
>         (define (file-name-separator-at-index? idx)

That looks good to me, but I’m Windows-oblivious ;-) and I’d like to
hear what Andy thinks, because he did the UNC thing in the past.  Andy?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]