Skip to content

Commit

Permalink
Configure: make absolutedir() use rel2abs() on Windows too
Browse files Browse the repository at this point in the history
perl's realpath() seems to be buggy on Windows, so we turn to rel2abs()
there as well.

Fixes openssl#23593

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#24569)

(cherry picked from commit 6e01d31)
  • Loading branch information
levitte authored and nhorman committed Jun 15, 2024
1 parent 026a8a7 commit a93d192
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Configure
Original file line number Diff line number Diff line change
Expand Up @@ -3407,6 +3407,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/;
Expand Down

0 comments on commit a93d192

Please sign in to comment.