- Status Closed
- Percent Complete
- Task Type Bugs
- Category Plugins
- Assigned To No-one
- Operating System All players
- Severity Low
- Priority Very Low
- Reported Version Daily build (which?)
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#10587 - Lua plugin: bad behaviour for io.open(path, 'w')
If 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
Closed by mcuelenaere
2009-09-06 21:42
Reason for closing: Fixed
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
2009-09-06 21:42
Reason for closing: Fixed
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
In r22645.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
I found a fix. The O_TRUNC flag was needed.
I filed a patch here: http://www.rockbox.org/tracker/task/10592