Kaydet (Commit) 6d2e3bda authored tarafından Isamu Mogi's avatar Isamu Mogi Kaydeden (comit) Luboš Luňák

fdo#41226 Add error handling of recursed GetCaseCorrectPathNameEx()

GetCaseCorrectPathNameEx() with bCheckExistence = true doesn't support windows
share path but occasionally it doesn't return failure and returns broken result.
For example, when we call with "\\USER-PC\Users\foo" then it converts the path
to "\Users\foo". And when "\Users\foo" exists, it returns "\Users\foo". It is
caused by missing error handling of searching for file "\\USER-PC". Also similar
bug possibly occurs even for local file path. This commit fixes these bugs.

Change-Id: Idf1dd1282510d8a6810ed239a83051bb0f8e2f87
Reviewed-on: https://gerrit.libreoffice.org/4151Reviewed-by: 's avatarLuboš Luňák <l.lunak@suse.cz>
Tested-by: 's avatarLuboš Luňák <l.lunak@suse.cz>
üst 53070b04
...@@ -486,7 +486,8 @@ static DWORD GetCaseCorrectPathNameEx( ...@@ -486,7 +486,8 @@ static DWORD GetCaseCorrectPathNameEx(
else else
bSkipThis = FALSE; bSkipThis = FALSE;
GetCaseCorrectPathNameEx( lpszPath, cchBuffer, nSkipLevels, bCheckExistence ); if ( !GetCaseCorrectPathNameEx( lpszPath, cchBuffer, nSkipLevels, bCheckExistence ) )
return 0;
PathAddBackslash( lpszPath, cchBuffer ); PathAddBackslash( lpszPath, cchBuffer );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment