]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Configure: make absolutedir() use rel2abs() on Windows too
authorRichard Levitte <levitte@openssl.org>
Wed, 5 Jun 2024 19:43:01 +0000 (21:43 +0200)
committerNeil Horman <nhorman@openssl.org>
Sat, 15 Jun 2024 12:02:18 +0000 (08:02 -0400)
perl's realpath() seems to be buggy on Windows, so we turn to rel2abs()
there as well.

Fixes #23593

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24569)

Configure

index c15f5b2fffe267effb165e3ca6493df14d0f9b8e..73a95a000ddaf2bc6415944d77dad11540c5f963 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -3522,6 +3522,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/;