[En-Nut-Discussion] Strange behavior with files using file attributes '+' or 'a'
Harald Kipp
harald.kipp at egnite.de
Wed Feb 27 12:18:11 CET 2008
Andreas Helmcke wrote:
> Michael Bieri wrote:
>>
>> - Sometimes, the 'a' attribute doesn't append my data, it only appends
>> some trash with the same length at the end.
>> - Sometimes, the 'a' attribute doesn't start "inserting"/appending data
>> at the end of my file, but inserts it at the beginning. fseek(...,
>> SEEK_END) does fix this problem.
>> - If I try to insert some data with 'rb+', it behaves like an ordinary
>> 'w' (existing data is lost, but new data is there).
>
> I had similar problems when trying to append to an already existing file but
> didn't find by now the time to file a bug.
> For me it works properly when opening the file with the correct attributes and
> doing fseek(...,0,SEEK_END) immediately afterwards.
Thanks for reporting this. Someone can add this to the bugtracker, please?
http://sourceforge.net/tracker/?group_id=34079
Harald
More information about the En-Nut-Discussion
mailing list