diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-06-06 14:44:20 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-06-06 14:44:20 (GMT) |
commit | 80de27ace5b86bc169874f1b366c9c0c422ab32a (patch) | |
tree | 4ef6ca8e57c23936337ba15fbea9168846ed348b /Source/kwsys | |
parent | c9f1af3913eb9aa8fdc7d374bf38bac59a6bbf59 (diff) | |
download | CMake-80de27ace5b86bc169874f1b366c9c0c422ab32a.zip CMake-80de27ace5b86bc169874f1b366c9c0c422ab32a.tar.gz CMake-80de27ace5b86bc169874f1b366c9c0c422ab32a.tar.bz2 |
ENH: fix case problem with drive letters and cmake vs CMakeSetup build.make changing
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 9212b45..959f6fc 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -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 } |