chicken-hackers
[Top][All Lists]
Advanced

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

[Chicken-hackers] [PATCH 1/4] csi dirseparator?: don't treat backslash a


From: Florian Zumbiehl
Subject: [Chicken-hackers] [PATCH 1/4] csi dirseparator?: don't treat backslash as dir separator on non-windows
Date: Fri, 15 Mar 2013 06:53:55 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

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.
---
 csi.scm |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/csi.scm b/csi.scm
index 7e7e475..6881d7b 100644
--- a/csi.scm
+++ b/csi.scm
@@ -172,7 +172,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] )
-- 
1.7.2.5




reply via email to

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