Hi,<br>i think that the problem is the \ character, because this works :<br>#lang racket<br>(equal? (regexp-replace* "\\\\" (path->string (build-path "C:\\")) "/")<br> (regexp-replace* "\\\\" (path->string (build-path "C:\\")) "/"))<br>
<br>and returns true<br><br>have a nice day,<br>-mw<br><br><div class="gmail_quote">2010/10/21 Danny Yoo <span dir="ltr"><<a href="mailto:dyoo@cs.wpi.edu">dyoo@cs.wpi.edu</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I'm trying to compare two paths for equality; I misread normalize-path<br>
and didn't realize that it does not do case folding, so that on<br>
Windows,<br>
<br>
(equal? (build-path "C:\\")<br>
(build-path "c:\\"))<br>
<br>
returns false. What's the right way to compare paths for equality?<br>
<br>
As a related question, what's the right way to see if one directory is<br>
a subdirectory of another?<br>
_________________________________________________<br>
For list-related administrative tasks:<br>
<a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>--------------------------------------------------------<div>site : <a href="http://scouic.com" target="_blank">http://scouic.com</a></div><div>--------------------------------------------------------</div>
<br>