summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKWSys Robot <kwrobot@kitware.com>2013-04-25 12:58:57 (GMT)
committerBrad King <brad.king@kitware.com>2013-04-26 20:08:25 (GMT)
commit327c982faf6a9f119b6547c099a6bbf2ee82e517 (patch)
tree7e1d3704ef595dee58273e3e9310f776f0a9fef7
parent83a9f09d184c89c79c0d8ec52868ad68b0604d5d (diff)
downloadCMake-327c982faf6a9f119b6547c099a6bbf2ee82e517.zip
CMake-327c982faf6a9f119b6547c099a6bbf2ee82e517.tar.gz
CMake-327c982faf6a9f119b6547c099a6bbf2ee82e517.tar.bz2
KWSys 2013-04-25 (709fb5c1)
Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ 709fb5c1 | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' 2d263bc3..709fb5c1 Brad King (1): 709fb5c1 SystemTools: Fix FileIsDirectory for Windows drive letter roots Change-Id: Ie71305c3787806599f79a3cc7096e74e7237e986
-rw-r--r--SystemTools.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/SystemTools.cxx b/SystemTools.cxx
index 22bf193..d816b17 100644
--- a/SystemTools.cxx
+++ b/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;