Add the O_TRUNC flag when writing the modified file back to disk - fixes FS #6559
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12122 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1d4c425431
commit
6820ed1f7f
1 changed files with 1 additions and 1 deletions
|
@ -175,7 +175,7 @@ void save_changes(int overwrite)
|
|||
rb->kbd_input(filename,MAX_PATH);
|
||||
}
|
||||
|
||||
fd = rb->open(filename,O_WRONLY|O_CREAT);
|
||||
fd = rb->open(filename,O_WRONLY|O_CREAT|O_TRUNC);
|
||||
if (fd < 0)
|
||||
{
|
||||
rb->splash(HZ*2,1,"Changes NOT saved");
|
||||
|
|
Loading…
Reference in a new issue