Hi,<div><br></div><div>I think there is a bug in the path->url function (from net/url).</div><div><br></div><div><div>> (url->string (path->url "/tmp"))</div><div>"file:///tmp"</div><div>> (url->string (path->url "/tmp/"))</div>
<div>"file:///tmp"</div></div><div><br></div><div>As you can see the resulting URL is the same even if the path is a directory path.</div><div>I believe that in the second case the URL should be "file:///tmp/".</div>
<div><br></div><div>This lead to an unexpected behaviour when using the result of path->url with combine-url/relative:</div><div><br></div><div><div>> (url->string (combine-url/relative (path->url "/tmp/") "foo.txt"))</div>
<div>"file:///foo.txt"</div></div><div><br></div><div>I've made a fix and created the pull request #166 on GitHub (<a href="https://github.com/plt/racket/pull/166">https://github.com/plt/racket/pull/166</a>)</div>
<div><br></div><div>Could you please merge this change ?</div><div><br></div><div>Also, it should be noted that the path->url and url->path are not symmetric as one could expect.<br></div><div>Before my modification:</div>
<div> (url->path (path->url "/tmp/")) => #<path:/tmp></div><div>After:</div><div> (url->path (path->url "/tmp/")) => #<path:/tmp/.></div><div><br></div><div>I don't think it is a real problem but I thought it was worth mentioning.</div>
<div><br></div><div><div>Regards,<br></div><div>Philippe Mechaļ</div><div><br></div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>