From 2021de684e92c0c72227d3d099d5c52a5978498a Mon Sep 17 00:00:00 2001 From: Sander van Leeuwen Date: Fri, 28 Jun 2002 17:34:57 +0000 Subject: [PATCH] Do not change directory if path is invalid. --- dlls/commdlg/filedlgbrowser.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/commdlg/filedlgbrowser.c b/dlls/commdlg/filedlgbrowser.c index 7d0d649d836..f48965fb8f4 100644 --- a/dlls/commdlg/filedlgbrowser.c +++ b/dlls/commdlg/filedlgbrowser.c @@ -93,9 +93,10 @@ extern HRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode); static void COMDLG32_UpdateCurrentDir(FileOpenDlgInfos *fodInfos) { char lpstrPath[MAX_PATH]; - SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent,lpstrPath); - SetCurrentDirectoryA(lpstrPath); - TRACE("new current folder %s\n", lpstrPath); + if(SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent,lpstrPath)) { + SetCurrentDirectoryA(lpstrPath); + TRACE("new current folder %s\n", lpstrPath); + } } /* copied from shell32 to avoid linking to it */