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)
  • Loading branch information
levitte authored and nhorman committed Jun 15, 2024
1 parent 1977c00 commit 6e01d31
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 @@ -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/;
Expand Down

0 comments on commit 6e01d31

Please sign in to comment.