This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10587 - Lua plugin: bad behaviour for io.open(path, 'w')
Attached to Project:
Rockbox
Opened by Christophe Gragnic (Grahack) - Saturday, 05 September 2009, 09:21 GMT+2
Last edited by Maurus Cuelenaere (mcuelenaere) - Sunday, 06 September 2009, 23:42 GMT+2
Opened by Christophe Gragnic (Grahack) - Saturday, 05 September 2009, 09:21 GMT+2
Last edited by Maurus Cuelenaere (mcuelenaere) - Sunday, 06 September 2009, 23:42 GMT+2
|
DetailsIf you write "some text" in a file with the 'w' flag, then write again "shorter" in the same file, the file will contain "shorterxt" (but should contain "shorter"). The length of the file didn't change.
You can try this with the little script I attached. Everything is fine with the 'w+' flag though. This occurs in r22628 and all previous versions. The culprit should be around those lines: http://svn.rockbox.org/viewvc.cgi/trunk/apps/plugins/lua/liolib.c?view=annotate#l135 |
This task depends upon
Closed by Maurus Cuelenaere (mcuelenaere)
Sunday, 06 September 2009, 23:42 GMT+2
Reason for closing: Fixed
Additional comments about closing: In r22645.
Sunday, 06 September 2009, 23:42 GMT+2
Reason for closing: Fixed
Additional comments about closing: In r22645.
I filed a patch here: http://www.rockbox.org/tracker/task/10592