This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11221 - Make upload.pl not mix up files
Attached to Project:
Rockbox
Opened by Frank Gevaerts (fg) - Tuesday, 27 April 2010, 01:41 GMT+2
Last edited by Björn Stenberg (zagor) - Tuesday, 27 April 2010, 13:00 GMT+2
Opened by Frank Gevaerts (fg) - Tuesday, 27 April 2010, 01:41 GMT+2
Last edited by Björn Stenberg (zagor) - Tuesday, 27 April 2010, 13:00 GMT+2
|
DetailsWith the original upload.pl, CGI::tmpFileName() seems to return the same filename again before the move() call in another instance has been completed (or even started). Adding a sleep(1) just before the move() and running many uploads simultaneously results in about 10% wrong files.
The attached patch (suggested by Dave Chapman) fixes the mixup by working with the file handle directly. Adding proper error handling is left as an exercise to the interested perl specialist. |
This task depends upon
Closed by Björn Stenberg (zagor)
Tuesday, 27 April 2010, 13:00 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed in r25738.
Tuesday, 27 April 2010, 13:00 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed in r25738.