Skip to content
Snippets Groups Projects
  • Morris Jobke's avatar
    de912385
    Fix seeking on object storage · de912385
    Morris Jobke authored
    
    Seeking is not needed if the $from is 0, because then the pointer is already at the correct position. Additionally another fallback is added, that if the fseek fails it just uses an fread to skip the beginning of the file until it is at the correct position. This skipping is done with a chunked fread.
    
    Signed-off-by: default avatarMorris Jobke <hey@morrisjobke.de>
    de912385
    History
    Fix seeking on object storage
    Morris Jobke authored
    
    Seeking is not needed if the $from is 0, because then the pointer is already at the correct position. Additionally another fallback is added, that if the fseek fails it just uses an fread to skip the beginning of the file until it is at the correct position. This skipping is done with a chunked fread.
    
    Signed-off-by: default avatarMorris Jobke <hey@morrisjobke.de>