[Insight-developers] no category in kitware mantis for KWSYS?

kent williams norman-k-williams at uiowa.edu
Tue Nov 23 10:53:43 EST 2010


I was looking through SystemTools.cxx and think I may have found a bug in
SystemTools::FileIsFullPath affecting Windows specifically.  But when I look
in Mantis there's no KWSys category.

Specifically: here is the test for Windows:

  if(name.length() < 2)
    {
    return false;
    }
  if(name[1] == ':')
    {
    return true;
    }
  if(name[0] == '\\')
    {
    return true;
    }

This doesn't handle a 4th possibility -- if you give a drive letter NOT
followed by a backslash (or a forward slash, actually) what you've specified
is a relative path on the specified drive.

Windows actually tracks a current working directory per logical drive. And
by 'logical drive' I mean anything that Windows shows as having a drive
letter, which covers several possibilities.



More information about the Insight-developers mailing list