From 327c982faf6a9f119b6547c099a6bbf2ee82e517 Mon Sep 17 00:00:00 2001 From: KWSys Robot Date: Thu, 25 Apr 2013 08:58:57 -0400 Subject: [PATCH] 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 --- SystemTools.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SystemTools.cxx b/SystemTools.cxx index 22bf193b0..d816b1785 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;