diff options
author | Dan Everton <dan@iocaine.org> | 2006-05-30 11:26:41 +0000 |
---|---|---|
committer | Dan Everton <dan@iocaine.org> | 2006-05-30 11:26:41 +0000 |
commit | b2ec716534441d9dea42051ce8bf2c1df227685a (patch) | |
tree | 34e4dfc8a4c2c595209437ccfb62fc1405860845 /apps/plugins/calendar.c | |
parent | e41c85806ecc5b8ed1383f856595d61ad45d6657 (diff) | |
download | rockbox-b2ec716534441d9dea42051ce8bf2c1df227685a.tar.gz rockbox-b2ec716534441d9dea42051ce8bf2c1df227685a.zip |
Use correct file mode when creating files. Fixes task 5452
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10020 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/calendar.c')
-rw-r--r-- | apps/plugins/calendar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c index 464d810342..a57cadedd2 100644 --- a/apps/plugins/calendar.c +++ b/apps/plugins/calendar.c | |||
@@ -316,7 +316,7 @@ static bool save_memo(int changed, bool new_mod, struct shown *shown) | |||
316 | { | 316 | { |
317 | int fp,fq; | 317 | int fp,fq; |
318 | fp = rb->open("/.rockbox/.memo",O_RDONLY | O_CREAT); | 318 | fp = rb->open("/.rockbox/.memo",O_RDONLY | O_CREAT); |
319 | fq = rb->creat("/.rockbox/~temp", 0); | 319 | fq = rb->creat("/.rockbox/~temp", O_WRONLY); |
320 | if ( (fq != -1) && (fp != -1) ) | 320 | if ( (fq != -1) && (fp != -1) ) |
321 | { | 321 | { |
322 | int i; | 322 | int i; |
@@ -345,7 +345,7 @@ static bool save_memo(int changed, bool new_mod, struct shown *shown) | |||
345 | rb->write(fq,temp,1); | 345 | rb->write(fq,temp,1); |
346 | } | 346 | } |
347 | rb->close(fp); | 347 | rb->close(fp); |
348 | fp = rb->creat("/.rockbox/.memo", 0); | 348 | fp = rb->creat("/.rockbox/.memo", O_WRONLY); |
349 | rb->lseek(fp, 0, SEEK_SET); | 349 | rb->lseek(fp, 0, SEEK_SET); |
350 | rb->lseek(fq, 0, SEEK_SET); | 350 | rb->lseek(fq, 0, SEEK_SET); |
351 | for (i = 0; i < rb->filesize(fq); i++) | 351 | for (i = 0; i < rb->filesize(fq); i++) |