[racket] reliable path comparison?

From: scouic (scouic at gmail.com)
Date: Thu Oct 21 11:23:16 EDT 2010

Hi,
i think that the problem is the \ character, because this works :
#lang racket
(equal? (regexp-replace* "\\\\" (path->string (build-path "C:\\")) "/")
        (regexp-replace* "\\\\" (path->string (build-path "C:\\")) "/"))

and returns true

have a nice day,
-mw

2010/10/21 Danny Yoo <dyoo at cs.wpi.edu>

> I'm trying to compare two paths for equality; I misread normalize-path
> and didn't realize that it does not do case folding, so that on
> Windows,
>
>   (equal? (build-path "C:\\")
>              (build-path "c:\\"))
>
> returns false.  What's the right way to compare paths for equality?
>
> As a related question, what's the right way to see if one directory is
> a subdirectory of another?
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



-- 
--------------------------------------------------------
site : http://scouic.com
--------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101021/46b860b8/attachment.html>

Posted on the users mailing list.