~ chicken-core (chicken-5) c09fafe6e1c0c492085ba58bca3b321817a7d53e


commit c09fafe6e1c0c492085ba58bca3b321817a7d53e
Author:     Florian Zumbiehl <florz@florz.de>
AuthorDate: Fri Mar 15 06:53:55 2013 +0100
Commit:     Mario Domenech Goulart <mario.goulart@gmail.com>
CommitDate: Fri Mar 15 22:30:31 2013 -0300

    csi dirseparator?: don't treat backslash as dir separator on non-windows
    
    Make csi's dirseparator? not flag backslashes as path component separators on
    non-windows, in particular so that chop-separator won't corrupt directory names
    ending in backslashes.
    
    Signed-off-by: Peter Bex <peter.bex@xs4all.nl>
    Signed-off-by: Mario Domenech Goulart <mario.goulart@gmail.com>

diff --git a/csi.scm b/csi.scm
index 55a2ce84..0f86280f 100644
--- a/csi.scm
+++ b/csi.scm
@@ -173,7 +173,8 @@ EOF
 ;;; Chop terminating separator from pathname:
 
 (define (dirseparator? c)
-  (or (char=? c #\\) (char=? c #\/)))
+  (or (and ##sys#windows-platform (char=? c #\\))
+      (char=? c #\/)))
 
 (define chop-separator 
   (let ([substring substring] )
Trap