ENH: do not force users to create paths

This commit is contained in:
Bill Hoffman 2006-01-24 22:20:56 -05:00
parent e2e08e4b96
commit 538d6e82d8

View File

@ -14,11 +14,11 @@
static char THIS_FILE[] = __FILE__; static char THIS_FILE[] = __FILE__;
#endif #endif
#define IDC_FOLDERTREE 0x3741 #define IDC_FOLDERTREE 0x3741
#define IDC_TITLE 0x3742 #define IDC_TITLE 0x3742
#define IDC_STATUSTEXT 0x3743 #define IDC_STATUSTEXT 0x3743
#define IDC_NEW_EDIT_PATH 0x3744 #define IDC_NEW_EDIT_PATH 0x3744
// Class CDlgWnd // Class CDlgWnd
BEGIN_MESSAGE_MAP(CPathDialogSub, CWnd) BEGIN_MESSAGE_MAP(CPathDialogSub, CWnd)
@ -248,18 +248,15 @@ int CPathDialog::MakeSurePathExists(LPCTSTR lpPath)
} }
strMsg.Format(c_FolderDoesNotExist, lpPath); strMsg.Format(c_FolderDoesNotExist, lpPath);
if(AfxMessageBox(strMsg, MB_YESNO|MB_ICONQUESTION) != IDYES) if(AfxMessageBox(strMsg, MB_YESNO|MB_ICONQUESTION) == IDYES)
{ {
return (int)-1; //create path
iRet=Touch(lpPath, FALSE);
if(iRet!=0)
{
throw iRet;
}
} }
//create path
iRet=Touch(lpPath, FALSE);
if(iRet!=0)
{
throw iRet;
}
return 0; return 0;
} }
catch(int nErrCode) catch(int nErrCode)