mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 13:50:10 -05:00
Simplify absolute path conversions using CollapseFullPath full signature
This commit is contained in:
@@ -2327,12 +2327,9 @@ bool HandleLockCommand(std::vector<std::string> const& args,
|
||||
path += "/cmake.lock";
|
||||
}
|
||||
|
||||
if (!cmsys::SystemTools::FileIsFullPath(path)) {
|
||||
path = status.GetMakefile().GetCurrentSourceDirectory() + "/" + path;
|
||||
}
|
||||
|
||||
// Unify path (remove '//', '/../', ...)
|
||||
path = cmSystemTools::CollapseFullPath(path);
|
||||
path = cmSystemTools::CollapseFullPath(
|
||||
path, status.GetMakefile().GetCurrentSourceDirectory());
|
||||
|
||||
// Create file and directories if needed
|
||||
std::string parentDir = cmSystemTools::GetParentDirectory(path);
|
||||
|
||||
Reference in New Issue
Block a user