cURL / Mailing Lists / curl-library / Single Mail

curl-library

patch to make drive letters work in file:// urls under Windows

From: David Byron <DByron_at_everdreamcorp.com>
Date: Wed, 6 Aug 2003 08:31:33 -0700

Seems too simple, but here's a patch to get curl to understand drive letters
(i. e. absolute paths) in Windows. Before this patch,

$ ./curl -v file://localhost/src/cobra/curl/tests/log/test200.txt

curl would look in /src/cobra/curl/tests/log/test200.txt of the current
drive. After this patch, curl looks in src/cobra/curl/tests/log/test200.txt
relative to the current directory.

However, before this patch,

$ ./curl -v file://localhost/c:/src/cobra/curl/tests/log/test200.txt

curl would look for /c:/src/cobra/curl/tests/log/test200.txt and not find
anything. After this patch, curl looks in
c:/src/cobra/curl/tests/log/test200.txt and happily finds what it's looking
for.

It gets as far through the testsuite as before the patch. Not saying much I
suppose since %PWD still doesn't do the right thing for native Windows
builds.

Please let me know what you think.

Thanks.

-DB

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

Received on 2003-08-06