Bug in delete_track in main.c

Anonymous
2003-06-11
2003-06-19
  • Anonymous - 2003-06-11

    The reason I haven't taken the time to fix this myself is I don't know if it affects all supported players.  A description of why delete_track's behavior is wrong for the S10 follows.

    Say you have 10 tracks on the player and you issue the command 'rioutil -m 0 -d 0-9'.  Five tracks are successfully deleted, then it errors.

    The problem is that the S10 renumbers its tracks from 0 each time a file is deleted.  So rioutil successfully deletes tracks 0, 1, 2, 3, and 4... but when it gets to 5 there is no track 5 (the remaining tracks having been renumbered 0-4) and boom!

    The correct way to delete tracks m through n inclusive would be to delete track m (n-m+1) times.

     
    • Anonymous - 2003-06-11

      Submitted a formal bug report and patch.

       
    • Anonymous - 2003-06-12

      Was thinking... if the S10 is different from other players in this regard, rather than trying to sort out which ones do what, simply code it so tracks are deleted from highest to lowest.

       
    • Nathan Hjelm

      Nathan Hjelm - 2003-06-19

      This was actually due to a bug that came out of removing an old download hack. the CVS version should fix this nasty little bug.

       

Log in to post a comment.