From f176bed03f9bcb6227ba9526cb2a9a04aff073bc Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Tue, 2 Aug 2011 23:54:07 +0200 Subject: [PATCH] Truncate file on writing, or we keep garbage at the end... --- firmware/filesystem/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/filesystem/util.c b/firmware/filesystem/util.c index 2965656..e425852 100644 --- a/firmware/filesystem/util.c +++ b/firmware/filesystem/util.c @@ -55,7 +55,7 @@ int writeFile(char * filename, char * data, int len){ UINT writebytes; int res; - res=f_open(&file, filename, FA_OPEN_ALWAYS|FA_WRITE); + res=f_open(&file, filename, FA_CREATE_ALWAYS|FA_WRITE); if(res){ return -1; };