diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm index e65ac6fc664..9bf111c41ef 100644 --- a/src/tools/msvc/Install.pm +++ b/src/tools/msvc/Install.pm @@ -63,8 +63,16 @@ sub Install do "./config.pl" if (-f "config.pl"); } - chdir("../../..") if (-f "../../../configure"); - chdir("../../../..") if (-f "../../../../configure"); + # Move to the root path depending on the current location. + if (-f "../../../configure") + { + chdir("../../.."); + } + elsif (-f "../../../../configure") + { + chdir("../../../.."); + } + my $conf = ""; if (-d "debug") {