Skip to content
Snippets Groups Projects
Commit fa15df7b authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: check return value of GetLongPath

parent 07e53e37
No related branches found
No related tags found
No related merge requests found
......@@ -2247,7 +2247,11 @@ kwsys_stl::string SystemTools::GetActualCaseForPath(const char* p)
return path;
}
char buffer[MAX_PATH+1];
::GetLongPathName(path.c_str(), buffer, MAX_PATH+1);
int len = ::GetLongPathName(path.c_str(), buffer, MAX_PATH+1);
if(len == 0 || len > MAX_PATH+1)
{
return path;
}
return buffer;
#endif
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment