Check command gives unreliable results

Here is a beta with a potential fix. I’m not sure it will actually fix your problem though.

http://pub.rclone.org/v1.35-150-g8f7b7e9-b2-list-fixβ/

If it doesn’t can you email me a complete log with -vv --dump-bodies to nick@craig-wood.com subject “rclone b2 check unreliable” and I’ll have to go through the log with a fine toothed comb.

Thanks

Nick

I managed to replicate the problem and I think that fix will fix the problem!

Hi Nick,

well, I think this time you got it!! The check is still running, but it would spit errors from the very beggining and in this case I see no sha-1 differences reported whatsoever.

Congrats! Could you briefly share with us the cause of the issue? Is it b2 related?

Cheers

Just for completion, check finished without finding any differences!

No the issue was entirely the code. The issue was caused when directory listings had more than 1000 items in them. I forgot to clear a variable when parsing the JSON the second time round the directory listing loop which meant that items which weren’t set in the second iteration (eg the sha1) were left from a previous iteration round the loop.

It was very easy to fix - I just moved the declaration of one variable. It uncovered a misunderstanding of how I thought go’s built in JSON parser worked which is why it took me so long to work out what was happening - the bug was really in me :wink:

Hooray!

Thanks for your help tracking this down.