BUG: Work around broken GetLongPathName case
On Windows the GetLongPathName API function does not work on some filesystems even if the file exists. In this case we should just use the original long path name and not the GetShortPathName result. See issue #8480.
This commit is contained in:
parent
dda19cd36f
commit
6ed916795d
|
@ -3058,6 +3058,11 @@ kwsys_stl::string SystemTools::GetActualCaseForPath(const char* p)
|
|||
{
|
||||
return p;
|
||||
}
|
||||
// Use original path if conversion back to a long path failed.
|
||||
if(longPath == shortPath)
|
||||
{
|
||||
longPath = p;
|
||||
}
|
||||
// make sure drive letter is always upper case
|
||||
if(longPath.size() > 1 && longPath[1] == ':')
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue