summaryrefslogtreecommitdiff
path: root/Source/kwsys
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-04-26 16:08:35 -0400
committerBrad King <brad.king@kitware.com>2013-04-26 16:08:35 -0400
commit0c04428d04d4a5043aaad54528c4ae6857ddf133 (patch)
treec93294b4b6d8b8dbaf7e9426021cad8ad2fb81bc /Source/kwsys
parentc8b34729d90366a7dfee7b0d4a3df1ebfd7cdeab (diff)
parent327c982faf6a9f119b6547c099a6bbf2ee82e517 (diff)
downloadcmake-0c04428d04d4a5043aaad54528c4ae6857ddf133.tar.gz
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys')
-rw-r--r--Source/kwsys/SystemTools.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 22bf193b08..d816b1785a 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -2741,11 +2741,11 @@ bool SystemTools::FileIsDirectory(const char* name)
return false;
}
- // Remove any trailing slash from the name.
+ // Remove any trailing slash from the name except in a root component.
char buffer[KWSYS_SYSTEMTOOLS_MAXPATH];
size_t last = length-1;
if(last > 0 && (name[last] == '/' || name[last] == '\\')
- && strcmp(name, "/") !=0)
+ && strcmp(name, "/") !=0 && name[last-1] != ':')
{
memcpy(buffer, name, last);
buffer[last] = 0;