From: Richard Levitte Date: Wed, 5 Jun 2024 19:43:01 +0000 (+0200) Subject: Configure: make absolutedir() use rel2abs() on Windows too X-Git-Tag: openssl-3.1.7~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db08afde02ec9f7a64335ae81f0e03de3723f7a6;p=thirdparty%2Fopenssl.git Configure: make absolutedir() use rel2abs() on Windows too perl's realpath() seems to be buggy on Windows, so we turn to rel2abs() there as well. Fixes #23593 Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/24569) (cherry picked from commit 6e01d3114b77c82cf83a2bfe53f7ba97840fbe36) --- diff --git a/Configure b/Configure index 0e649a890cc..a6dffde9e46 100755 --- a/Configure +++ b/Configure @@ -3394,6 +3394,13 @@ sub absolutedir { return rel2abs($dir); } + # realpath() on Windows seems to check if the directory actually exists, + # which isn't what is wanted here. All we want to know is if a directory + # spec is absolute, not if it exists. + if ($^O eq "MSWin32") { + return rel2abs($dir); + } + # We use realpath() on Unix, since no other will properly clean out # a directory spec. use Cwd qw/realpath/;