unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Eli Zaretskii <eliz@gnu.org>, Andy Wingo <wingo@pobox.com>
Cc: Mark H Weaver <mhw@netris.org>, guile-devel@gnu.org
Subject: Re: Windows file names snafu
Date: Mon, 30 Jun 2014 13:12:44 +0200	[thread overview]
Message-ID: <87simm1wib.fsf@gnu.org> (raw)
In-Reply-To: <83k37z65wr.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 29 Jun 2014 19:23:48 +0300")

Eli Zaretskii <eliz@gnu.org> 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?

Ludo’.



      reply	other threads:[~2014-06-30 11:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-29 16:23 Windows file names snafu Eli Zaretskii
2014-06-30 11:12 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87simm1wib.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=eliz@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.org \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).