mirror of
https://github.com/transmission/transmission
synced 2025-03-09 21:54:09 +00:00
Fix bug where upload and download totals were discarded when fastresume failed.
This commit is contained in:
parent
2ef0725b59
commit
e1c5b19b46
1 changed files with 13 additions and 7 deletions
|
@ -315,10 +315,16 @@ static int fastResumeLoad( tr_io_t * io )
|
||||||
{
|
{
|
||||||
if( fastResumeLoadProgress( io, file ) )
|
if( fastResumeLoadProgress( io, file ) )
|
||||||
{
|
{
|
||||||
fclose( file );
|
if( feof( file ) || ferror( file ) )
|
||||||
return 1;
|
{
|
||||||
|
fclose( file );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ret = 0;
|
||||||
}
|
}
|
||||||
ret = 0;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -329,8 +335,8 @@ static int fastResumeLoad( tr_io_t * io )
|
||||||
{
|
{
|
||||||
if( 1 != fread( &tor->downloaded, 8, 1, file ) )
|
if( 1 != fread( &tor->downloaded, 8, 1, file ) )
|
||||||
{
|
{
|
||||||
fclose( file );
|
fclose( file );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -342,8 +348,8 @@ static int fastResumeLoad( tr_io_t * io )
|
||||||
{
|
{
|
||||||
if( 1 != fread( &tor->uploaded, 8, 1, file ) )
|
if( 1 != fread( &tor->uploaded, 8, 1, file ) )
|
||||||
{
|
{
|
||||||
fclose( file );
|
fclose( file );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue