diff options
Diffstat (limited to 'apps/plugins/calendar.c')
-rw-r--r-- | apps/plugins/calendar.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c index b9f9e8cf67..e938af873e 100644 --- a/apps/plugins/calendar.c +++ b/apps/plugins/calendar.c @@ -514,14 +514,15 @@ static void load_memo(struct shown *shown) break; } } + rb->close(fp); } - rb->close(fp); } static bool save_memo(int changed, bool new_mod, struct shown *shown) { int fp,fq; - fp = rb->open(ROCKBOX_DIR "/.memo",O_RDONLY | O_CREAT); + /* use O_RDWR|O_CREAT so that file is created if it doesn't exist. */ + fp = rb->open(ROCKBOX_DIR "/.memo", O_RDWR|O_CREAT); fq = rb->creat(ROCKBOX_DIR "/~temp"); if ( (fq > -1) && (fp > -1) ) { |