aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/main.c
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@nuclecu.unam.mx>1999-08-31 06:36:43 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-08-31 06:36:43 +0800
commita5dc758170c40d86ee361f607eae62aa6e7509d8 (patch)
tree97b036b15f32713a5a1cb86a19784877b0d4f5d9 /calendar/main.c
parent122f27a2aae0c712339b39bd3b7581624b8a03b5 (diff)
downloadgsoc2013-evolution-a5dc758170c40d86ee361f607eae62aa6e7509d8.tar
gsoc2013-evolution-a5dc758170c40d86ee361f607eae62aa6e7509d8.tar.gz
gsoc2013-evolution-a5dc758170c40d86ee361f607eae62aa6e7509d8.tar.bz2
gsoc2013-evolution-a5dc758170c40d86ee361f607eae62aa6e7509d8.tar.lz
gsoc2013-evolution-a5dc758170c40d86ee361f607eae62aa6e7509d8.tar.xz
gsoc2013-evolution-a5dc758170c40d86ee361f607eae62aa6e7509d8.tar.zst
gsoc2013-evolution-a5dc758170c40d86ee361f607eae62aa6e7509d8.zip
Modify the object->last_mod field. (calendar_add_object): Ditto.
1999-08-30 Miguel de Icaza <miguel@nuclecu.unam.mx> * calendar.c (calendar_object_changed): Modify the object->last_mod field. (calendar_add_object): Ditto. Closes bug #676 * main.c (save_calendar_cmd): Fix problem in which we warned the user about the calendar being modified the first time the calendar was used. svn path=/trunk/; revision=1150
Diffstat (limited to 'calendar/main.c')
-rw-r--r--calendar/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/calendar/main.c b/calendar/main.c
index 6c4a4b4522..1cd65f331e 100644
--- a/calendar/main.c
+++ b/calendar/main.c
@@ -15,6 +15,7 @@
#include <sys/stat.h>
#include <string.h>
#include <ctype.h>
+#include <errno.h>
#include "calendar.h"
#include "alarm.h"
#include "eventedit.h"
@@ -422,7 +423,12 @@ save_calendar_cmd (GtkWidget *widget, void *data)
if (gcal->cal->filename){
struct stat s;
- stat (gcal->cal->filename, &s);
+ if (stat (gcal->cal->filename, &s) == -1){
+ if (errno == ENOENT)
+ calendar_save (gcal->cal, gcal->cal->filename);
+
+ return;
+ }
if (s.st_mtime != gcal->cal->file_time){
GtkWidget *box;