mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
Handle empty strings and invalid values in lpstrInitialDir for 32 bits
open file dialogs.
This commit is contained in:
parent
c2c004deeb
commit
a9c889055b
@ -2693,7 +2693,7 @@ LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl)
|
||||
* GetPidlFromName
|
||||
*
|
||||
* returns the pidl of the file name relative to folder
|
||||
* NULL if an error occured
|
||||
* NULL if an error occurred
|
||||
*/
|
||||
LPITEMIDLIST GetPidlFromName(IShellFolder *lpsf,LPCSTR lpcstrFileName)
|
||||
{
|
||||
@ -2704,7 +2704,8 @@ LPITEMIDLIST GetPidlFromName(IShellFolder *lpsf,LPCSTR lpcstrFileName)
|
||||
TRACE("sf=%p file=%s\n", lpsf, lpcstrFileName);
|
||||
|
||||
if(!lpcstrFileName) return NULL;
|
||||
|
||||
if(!*lpcstrFileName) return NULL;
|
||||
|
||||
MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,lpcstrFileName,-1,(LPWSTR)lpwstrDirName,MAX_PATH);
|
||||
|
||||
if(!lpsf)
|
||||
|
@ -682,7 +682,10 @@ static HRESULT WINAPI IShellFolder_fnParseDisplayName(
|
||||
}
|
||||
}
|
||||
|
||||
*ppidl = pidlTemp;
|
||||
if (!hr)
|
||||
*ppidl = pidlTemp;
|
||||
else
|
||||
*ppidl = NULL;
|
||||
|
||||
TRACE("(%p)->(-- pidl=%p ret=0x%08lx)\n", This, ppidl? *ppidl:0, hr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user