diff options
author | Brad King <brad.king@kitware.com> | 2013-01-08 13:42:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-01-08 13:42:58 (GMT) |
commit | 6f6afbd69f6ff30ec545ac8bea2ffd99d8cd48fc (patch) | |
tree | 00852b14697e747154c79003c49ab759e8e3b085 /Source/kwsys/SystemTools.cxx | |
parent | c7550d5ef12d8185fad93d581ebd52474ae3d1b0 (diff) | |
parent | 495fa24d70ce4c5b594e15cae464af243a127fb8 (diff) | |
download | CMake-6f6afbd69f6ff30ec545ac8bea2ffd99d8cd48fc.zip CMake-6f6afbd69f6ff30ec545ac8bea2ffd99d8cd48fc.tar.gz CMake-6f6afbd69f6ff30ec545ac8bea2ffd99d8cd48fc.tar.bz2 |
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 1054d65..b75993e 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -157,7 +157,7 @@ public: #include <os/storage/Path.h> #endif -#if defined(__BEOS__) && !defined(__ZETA__) && !defined(__HAIKU__) +#if defined(__BEOS__) && !defined(__ZETA__) #include <be/kernel/OS.h> #include <be/storage/Path.h> @@ -622,11 +622,7 @@ bool SystemTools::MakeDirectory(const char* path) } SystemTools::ConvertToUnixSlashes(dir); - kwsys_stl::string::size_type pos = dir.find(':'); - if(pos == kwsys_stl::string::npos) - { - pos = 0; - } + kwsys_stl::string::size_type pos = 0; kwsys_stl::string topdir; while((pos = dir.find('/', pos)) != kwsys_stl::string::npos) { @@ -634,14 +630,7 @@ bool SystemTools::MakeDirectory(const char* path) Mkdir(topdir.c_str()); pos++; } - if(dir[dir.size()-1] == '/') - { - topdir = dir.substr(0, dir.size()); - } - else - { - topdir = dir; - } + topdir = dir; if(Mkdir(topdir.c_str()) != 0) { // There is a bug in the Borland Run time library which makes MKDIR @@ -4054,7 +4043,7 @@ kwsys_stl::string SystemTools::GetCurrentDateTime(const char* format) return kwsys_stl::string(buf); } -kwsys_stl::string SystemTools::MakeCindentifier(const char* s) +kwsys_stl::string SystemTools::MakeCidentifier(const char* s) { kwsys_stl::string str(s); if (str.find_first_of("0123456789") == 0) |