AnsweredAssumed Answered

fopen - append bug

Question asked by Rafael Dazcal on Apr 29, 2011
Latest reply on Apr 29, 2011 by Rafael Dazcal

Greetings,

 

I'm using MQX3.6 and I think I found a bug on MFS in conjuction with a USB Pen Drive...

 

I open a file in the USB to append data to it with:

fd = fopen("c:\\log.txt", "a")

 

I write data to it and close it, and it works fine. Every time I log something, it goes to the end of the file preserving previous data.

 

But if I insert the USB stick and try loging, it overwrites several bytes in the end of the file.

 

If I insert the USB Stick and type in the shell: "type log.txt" before I write data into it, it works fine.

 

Have you guys seen it? Has that been fixed in MQX3.7?

Outcomes