mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 04:29:52 +00:00
ENH: fix case problem with drive letters and cmake vs CMakeSetup build.make changing
This commit is contained in:
parent
c9f1af3913
commit
80de27ace5
@ -154,6 +154,11 @@ inline const char* Getcwd(char* buf, unsigned int len)
|
||||
fprintf(stderr, "No current working directory.\n");
|
||||
abort();
|
||||
}
|
||||
// make sure the drive letter is capital
|
||||
if(strlen(buf) > 1 && buf[1] == ':')
|
||||
{
|
||||
buf[0] = toupper(buf[0]);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
inline int Chdir(const char* dir)
|
||||
@ -2875,6 +2880,11 @@ kwsys_stl::string SystemTools::GetActualCaseForPath(const char* p)
|
||||
{
|
||||
return p;
|
||||
}
|
||||
// make sure drive letter is always upper case
|
||||
if(longPath.size() > 1 && longPath[1] == ':')
|
||||
{
|
||||
longPath[0] = toupper(longPath[0]);
|
||||
}
|
||||
return longPath;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user