Commit 4a79475b authored by Dan Fandrich's avatar Dan Fandrich
Browse files

testcurl.pl: use rel2abs to make the source directory absolute

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.
parent b6e3da5f
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -61,7 +61,7 @@
use strict;
use strict;


use Cwd;
use Cwd;
use Cwd 'abs_path';
use File::Spec;


# Turn on warnings (equivalent to -w, which can't be used with /usr/bin/env)
# Turn on warnings (equivalent to -w, which can't be used with /usr/bin/env)
#BEGIN { $^W = 1; }
#BEGIN { $^W = 1; }
@@ -390,7 +390,7 @@ if (-d $CURLDIR) {
}
}


# make the path absolute so we can use it everywhere
# make the path absolute so we can use it everywhere
$CURLDIR = abs_path("$CURLDIR");
$CURLDIR = File::Spec->rel2abs("$CURLDIR");


$build="build-$$";
$build="build-$$";
$buildlogname="buildlog-$$";
$buildlogname="buildlog-$$";
@@ -573,7 +573,7 @@ if ($configurebuild) {
} else {
} else {
  logit "copying files to build dir ...";
  logit "copying files to build dir ...";
  if (($^O eq 'MSWin32') && ($targetos !~ /netware/)) {
  if (($^O eq 'MSWin32') && ($targetos !~ /netware/)) {
    system("xcopy /s /q $CURLDIR .");
    system("xcopy /s /q \"$CURLDIR\" .");
    system("buildconf.bat");
    system("buildconf.bat");
  }
  }
  elsif ($targetos =~ /netware/) {
  elsif ($targetos =~ /netware/) {