Fixed the repair to also support blocksize values that are not evenly divisible with the blockhash size

This commit is contained in:
Kenneth Skovhede
2016-03-27 12:50:40 +02:00
parent 571c12477c
commit a6699e513d
@@ -84,7 +84,7 @@ namespace Duplicati.Library.Main.Database
""E"".""BlocksetID"",
""F"".""Index"" + (""E"".""BlocklistIndex"" * {3}) AS ""FullIndex"",
""F"".""BlockHash"",
MIN({3} * {1}, ""E"".""Length"" - ((""F"".""Index"" + (""E"".""BlocklistIndex"" * {3})) * {0})) AS ""BlockSize"",
MIN({0}, ""E"".""Length"" - ((""F"".""Index"" + (""E"".""BlocklistIndex"" * {3})) * {0})) AS ""BlockSize"",
""E"".""Hash"",
""E"".""BlocklistSize"",
""E"".""BlocklistHash""