[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Bug in canonical-path?
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] Bug in canonical-path? |
Date: |
Sun, 26 Oct 2008 19:50:26 +0100 |
User-agent: |
Mutt/1.4.2.3i |
On Sun, Oct 26, 2008 at 01:19:42AM -0700, Elf wrote:
> > ~$ touch abc\\298.test
> >
> > csi> (find-files "." regular-file? (lambda (x y)(print x)
> > (print (file-stat (canonical-path x)))))
> >
> > ./abc\298.test
> > Error: (file-stat) cannot access file - No such file or
> > directory: "/home/matt/stuff/tools/lmbk/abc/298.test"
> >
> >
>
> this isn't a bug; it has to handle both windows and unix paths. i can add
> optional flags for specifying behaviour of slash and backslash, if desired.
It would be better to make the behaviour be system-specific, instead of
adding flags. On Windows, *always* treat slashes as backslashes. On Unix,
*only* accept slashes with no additional translation steps. (I'm not sure
Windows doesn't allow slashes in filenames, but I don't think it does)
Also, why does file-stat interpret the backslash in the first place?
AFAIK you can mix slashes and backslashes in Windows, so you shouldn't
have to do anything at all.
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
pgpxQjcSzqyuN.pgp
Description: PGP signature
- [Chicken-users] Bug in canonical-path?, Matthew Welland, 2008/10/25
- Re: [Chicken-users] Bug in canonical-path?, Elf, 2008/10/26
- Re: [Chicken-users] Bug in canonical-path?,
Peter Bex <=
- Re: [Chicken-users] Bug in canonical-path?, Vincent Manis, 2008/10/26
- Re: [Chicken-users] Bug in canonical-path?, Ivan Raikov, 2008/10/29
- Re: [Chicken-users] Bug in canonical-path?, felix winkelmann, 2008/10/29
- Re: [Chicken-users] Bug in canonical-path?, Peter Bex, 2008/10/29
- Re: [Chicken-users] Bug in canonical-path?, felix winkelmann, 2008/10/29
- Re: [Chicken-users] Bug in canonical-path?, Elf, 2008/10/29
- Re: [Chicken-users] Bug in canonical-path?, Ivan Raikov, 2008/10/29
- Re: [Chicken-users] Bug in canonical-path?, felix winkelmann, 2008/10/30
- Re: [Chicken-users] Bug in canonical-path?, Alex Shinn, 2008/10/30
- Re: [Chicken-users] Bug in canonical-path?, John Cowan, 2008/10/26