mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 03:24:26 +00:00
fix 15325 - don't allow dupl config
This commit is contained in:
parent
72c8faab62
commit
c44e44b6d9
@ -545,12 +545,25 @@ BOOL CWizardUI::SortList(WIDGET *curWidget)
|
|||||||
BOOL CWizardUI::NewConfig(WIDGET *curWidget, CString globalsName)
|
BOOL CWizardUI::NewConfig(WIDGET *curWidget, CString globalsName)
|
||||||
{
|
{
|
||||||
// This doesn't really belong here...
|
// This doesn't really belong here...
|
||||||
|
WIN32_FIND_DATA data;
|
||||||
|
HANDLE d;
|
||||||
|
|
||||||
CNewConfigDialog newDlg;
|
CNewConfigDialog newDlg;
|
||||||
newDlg.DoModal();
|
newDlg.DoModal();
|
||||||
CString configField = newDlg.GetConfigName();
|
CString configField = newDlg.GetConfigName();
|
||||||
CString newDir = CString(customizationPath);
|
CString newDir = CString(customizationPath);
|
||||||
newDir += configField;
|
newDir += configField;
|
||||||
|
|
||||||
|
d = FindFirstFile((const char *) newDir, &data);
|
||||||
|
if (d == INVALID_HANDLE_VALUE)
|
||||||
_mkdir(newDir);
|
_mkdir(newDir);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CWnd myWnd;
|
||||||
|
myWnd.MessageBox("That configuration already exists.", "Error", MB_OK);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
WIDGET* tmpWidget = theApp.findWidget((char*) (LPCTSTR)curWidget->target);
|
WIDGET* tmpWidget = theApp.findWidget((char*) (LPCTSTR)curWidget->target);
|
||||||
if (!tmpWidget)
|
if (!tmpWidget)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user