MGR: Continue adding Exclusive Apps pane to Computing Prefs dialog

svn path=/trunk/boinc/; revision=23495
This commit is contained in:
Charlie Fenton 2011-05-04 11:14:23 +00:00
parent 460c4133d6
commit 9f5bc01a25
1 changed files with 7 additions and 4 deletions

View File

@ -836,7 +836,12 @@ void CDlgAdvPreferences::OnAddExclusiveApp(wxCommandEvent&) {
// Strip off path if present // Strip off path if present
appNames.Add(theAppName.AfterLast(path_separator)); appNames.Add(theAppName.AfterLast(path_separator));
// We can only perform minimal validation on remote hosts }
for (i=0; i<appNames.Count(); ++i) {
// wxFileName::IsFileExecutable() doesn't seem to work on Windows,
// and we can only perform minimal validation on remote hosts, so
// check filename extension on Mac and Win
if (hostIsMac || hostIsWin) { if (hostIsMac || hostIsWin) {
if (!appNames[0].EndsWith(extension)) { if (!appNames[0].EndsWith(extension)) {
errmsg.Printf(_("Application names must end with '%s'"), extension); errmsg.Printf(_("Application names must end with '%s'"), extension);
@ -845,9 +850,7 @@ void CDlgAdvPreferences::OnAddExclusiveApp(wxCommandEvent&) {
return; return;
} }
} }
}
for (i=0; i<appNames.Count(); ++i) {
if (hostIsMac) { if (hostIsMac) {
int suffix = appNames[i].Find('.', true); int suffix = appNames[i].Find('.', true);
if (suffix != wxNOT_FOUND) { if (suffix != wxNOT_FOUND) {