-rw-r--r-- | korganizer/kofilterview.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 7ce3f1f..6a6fff9 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -366,5 +366,5 @@ void KOCalEditView::addCal() { bool tryagain = true; - QString name, file; + QString name, file = KGlobalSettings::calendarDir()+"newCal.ics"; while ( tryagain ) { KONewCalPrefs prefs ( this ); @@ -387,9 +387,13 @@ void KOCalEditView::addCal() KMessageBox::information( this, i18n("Sorry, the file \n%1\nis already loaded!\nPlease choose another file!").arg( KGlobal::formatMessage (file, 0 )) ); tryagain = true; - file = ""; + file = KGlobalSettings::calendarDir()+"newCal.ics"; break; } kkf = KOPrefs::instance()->mCalendars.next(); } + QFileInfo fi ( file ); + if ( fi.isDir() ) { + tryagain = true; + } } addCalendar ( name, file ); |