]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Use getcwd() to get the directory, which works even if one of the directory
authorDan Fandrich <dan@coneharvesters.com>
Sat, 22 Dec 2007 18:25:43 +0000 (18:25 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Sat, 22 Dec 2007 18:25:43 +0000 (18:25 +0000)
components doesn't have read permission set.

tests/httpsserver.pl
tests/runtests.pl
tests/sshserver.pl

index 3cc6c1ea900a2ea0adb3c67de3c51d8f2ee6060f..95ba103172ee25e503861bdd8aefefa25c691cc5 100644 (file)
@@ -6,6 +6,7 @@
 # It is actually just a layer that runs stunnel properly.
 
 use strict;
+use Cwd;
 
 my $stunnel = "stunnel";
 
@@ -21,8 +22,7 @@ my $verbose=0; # set to 1 for debugging
 my $port = 8991;        # just our default, weird enough
 my $target_port = 8999; # default test http-server port
 
-my $path = `pwd`;
-chomp $path;
+my $path = getcwd();
 
 my $srcdir=$path;
 
index b1258d08fca2c55df4feb75c5ba37a31ceae8421..9a7e14b9fec835eb5b7af8e10ffa796ba8464c38 100755 (executable)
@@ -59,6 +59,7 @@
 use strict;
 #use Time::HiRes qw( gettimeofday );
 #use warnings;
+use Cwd;
 
 @INC=(@INC, $ENV{'srcdir'}, ".");
 
@@ -133,8 +134,7 @@ my $memdump="$LOGDIR/memdump";
 # the path to the script that analyzes the memory debug output file:
 my $memanalyze="$perl $srcdir/memanalyze.pl";
 
-my $pwd;          # current working directory
-chomp($pwd = `pwd`);
+my $pwd = getcwd();          # current working directory
 
 my $start;
 my $forkserver=0;
index 8cad2248b79e56c328032b2dcd2bbd7528c8bd7c..dafa60e24fb0535f08ff26ea794250731977b202 100644 (file)
@@ -11,6 +11,7 @@
 
 use strict;
 use File::Spec;
+use Cwd;
 
 my $verbose=1; # set to 1 for debugging
 my $showfiles=0;
@@ -22,8 +23,7 @@ my $conffile="curl_sshd_config";    # sshd configuration data
 my $conffile_ssh="curl_ssh_config";    # ssh configuration data
 my $knownhostsfile="curl_client_knownhosts";    # ssh knownhosts file
 
-my $path = `pwd`;
-chomp $path;
+my $path = getcwd();
 
 my $exeext;
 if ($^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'msys' || $^O eq 'dos' || $^O eq 'os2') {