]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
testcurl.pl: use rel2abs to make the source directory absolute
authorDan Fandrich <dan@coneharvesters.com>
Sun, 24 May 2015 10:02:30 +0000 (12:02 +0200)
committerDan Fandrich <dan@coneharvesters.com>
Sun, 24 May 2015 10:09:34 +0000 (12:09 +0200)
This function makes a platform-specific absolute path which uses
backslashes on Windows. This form works when passing it on the
command-line, as well as if the source is on another drive.

tests/testcurl.pl

index 80520bfc9541a92611bf3c5d5dfb1d7217f59587..2b9e0831c6671471bd8d68e4a43b716a025de3cb 100755 (executable)
@@ -61,7 +61,7 @@
 use strict;
 
 use Cwd;
-use Cwd 'abs_path';
+use File::Spec;
 
 # Turn on warnings (equivalent to -w, which can't be used with /usr/bin/env)
 #BEGIN { $^W = 1; }
@@ -390,7 +390,7 @@ if (-d $CURLDIR) {
 }
 
 # make the path absolute so we can use it everywhere
-$CURLDIR = abs_path("$CURLDIR");
+$CURLDIR = File::Spec->rel2abs("$CURLDIR");
 
 $build="build-$$";
 $buildlogname="buildlog-$$";
@@ -573,7 +573,7 @@ if ($configurebuild) {
 } else {
   logit "copying files to build dir ...";
   if (($^O eq 'MSWin32') && ($targetos !~ /netware/)) {
-    system("xcopy /s /q $CURLDIR .");
+    system("xcopy /s /q \"$CURLDIR\" .");
     system("buildconf.bat");
   }
   elsif ($targetos =~ /netware/) {