Browse Source

don't check for a valid database after they select a new db in options

git-svn-id: svn://svn.code.sf.net/p/ditto-cp/code/trunk@361 595ec19a-5cb4-439b-94a8-42fb3063c22c
sabrogden 19 years ago
parent
commit
6aa9be44e8
1 changed files with 13 additions and 4 deletions
  1. 13 4
      OptionsGeneral.cpp

+ 13 - 4
OptionsGeneral.cpp

@@ -396,13 +396,22 @@ void COptionsGeneral::OnGetPath()
 		}
 	}
 
-	if(ValidDB(csPath) == FALSE)
+	if(FileExists(csPath))
 	{
-		MessageBox(_T("Invalid Database"), _T("Ditto"), MB_OK);
-		m_ePath.SetFocus();
+		if(ValidDB(csPath) == FALSE)
+		{
+			MessageBox(_T("Invalid Database"), _T("Ditto"), MB_OK);
+			m_ePath.SetFocus();
+		}
+		else
+		{
+			m_ePath.SetWindowText(csPath);	
+		}
 	}
 	else
-		m_ePath.SetWindowText(csPath);	
+	{
+		m_ePath.SetWindowText(csPath);
+	}
 }
 
 void COptionsGeneral::OnSelectSound()