1
0
Fork 0
forked from len0rd/rockbox

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:
Dave Chapman 2007-01-27 10:45:34 +00:00
parent 1d4c425431
commit 6820ed1f7f

View file

@ -175,7 +175,7 @@ void save_changes(int overwrite)
rb->kbd_input(filename,MAX_PATH); 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) if (fd < 0)
{ {
rb->splash(HZ*2,1,"Changes NOT saved"); rb->splash(HZ*2,1,"Changes NOT saved");