cpack: Explicitly normalize input paths as they exist on disk

This commit is contained in:
Brad King
2024-10-09 16:48:56 -04:00
parent 9fe09ebc53
commit 1f14238701

View File

@@ -405,7 +405,7 @@ int main(int argc, char const* const* argv)
bool cpackConfigFileSpecified = true;
if (!cpackConfigFile.empty()) {
cpackConfigFile = cmSystemTools::CollapseFullPath(cpackConfigFile);
cpackConfigFile = cmSystemTools::ToNormalizedPathOnDisk(cpackConfigFile);
} else {
cpackConfigFile = cmStrCat(cmSystemTools::GetCurrentWorkingDirectory(),
"/CPackConfig.cmake");
@@ -479,7 +479,7 @@ int main(int argc, char const* const* argv)
if (!cpackProjectDirectory.empty()) {
// The value has been set on the command line. Ensure it is absolute.
cpackProjectDirectory =
cmSystemTools::CollapseFullPath(cpackProjectDirectory);
cmSystemTools::ToNormalizedPathOnDisk(cpackProjectDirectory);
} else {
// The value has not been set on the command line. Check config file.
if (cmValue pd = globalMF.GetDefinition("CPACK_PACKAGE_DIRECTORY")) {