1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Dan Everton 2006-05-30 11:26:41 +00:00
parent e41c85806e
commit b2ec716534
10 changed files with 11 additions and 11 deletions

View file

@ -316,7 +316,7 @@ static bool save_memo(int changed, bool new_mod, struct shown *shown)
{
int fp,fq;
fp = rb->open("/.rockbox/.memo",O_RDONLY | O_CREAT);
fq = rb->creat("/.rockbox/~temp", 0);
fq = rb->creat("/.rockbox/~temp", O_WRONLY);
if ( (fq != -1) && (fp != -1) )
{
int i;
@ -345,7 +345,7 @@ static bool save_memo(int changed, bool new_mod, struct shown *shown)
rb->write(fq,temp,1);
}
rb->close(fp);
fp = rb->creat("/.rockbox/.memo", 0);
fp = rb->creat("/.rockbox/.memo", O_WRONLY);
rb->lseek(fp, 0, SEEK_SET);
rb->lseek(fq, 0, SEEK_SET);
for (i = 0; i < rb->filesize(fq); i++)