On Fri, Mar 15, 2013 at 06:53:55AM +0100, Florian Zumbiehl wrote:
> 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.

This patch is fine, I've signed off on it as-is.

It could go into stability, but maybe it's not critical enough to do so
since it hasn't caused any trouble yet and it's only for csi itself,
which generally doesn't get used with weird pathnames anyway.  So I'll
leave this decision to the maintainer who will sign off and push the
patch.

Cheers,
Peter
-- 
http://www.more-magic.net
>From b40449f0b7bbb42110c807099cb92bc99b110bb3 Mon Sep 17 00:00:00 2001
From: Florian Zumbiehl <[email protected]>
Date: Fri, 15 Mar 2013 06:53:55 +0100
Subject: [PATCH] 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 <[email protected]>
---
 csi.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/csi.scm b/csi.scm
index b2b9f24..7c961b8 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] )
-- 
1.7.12

_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to