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
This commit is contained in:
KWSys Robot 2013-04-25 08:58:57 -04:00 committed by Brad King
parent 83a9f09d18
commit 327c982faf
1 changed files with 2 additions and 2 deletions

View File

@ -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;