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:
parent
83a9f09d18
commit
327c982faf
|
@ -2741,11 +2741,11 @@ bool SystemTools::FileIsDirectory(const char* name)
|
||||||
return false;
|
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];
|
char buffer[KWSYS_SYSTEMTOOLS_MAXPATH];
|
||||||
size_t last = length-1;
|
size_t last = length-1;
|
||||||
if(last > 0 && (name[last] == '/' || name[last] == '\\')
|
if(last > 0 && (name[last] == '/' || name[last] == '\\')
|
||||||
&& strcmp(name, "/") !=0)
|
&& strcmp(name, "/") !=0 && name[last-1] != ':')
|
||||||
{
|
{
|
||||||
memcpy(buffer, name, last);
|
memcpy(buffer, name, last);
|
||||||
buffer[last] = 0;
|
buffer[last] = 0;
|
||||||
|
|
Loading…
Reference in New Issue