From 4c04798aa5c641be6eb47e35603a08e0f35f1874 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 21 Jan 2025 22:04:20 +0000 Subject: [PATCH] u2c: fix hash-calculator mode it produced the correct chunk-hashes with --chs but the total file-hash was wrong regardless --- bin/u2c.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/u2c.py b/bin/u2c.py index 78d426f2..d9ddec76 100755 --- a/bin/u2c.py +++ b/bin/u2c.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 from __future__ import print_function, unicode_literals -S_VERSION = "2.7" -S_BUILD_DT = "2024-12-06" +S_VERSION = "2.8" +S_BUILD_DT = "2025-01-21" """ u2c.py: upload to copyparty @@ -1249,7 +1249,7 @@ class Ctl(object): for n, zsii in enumerate(file.cids) ] print("chs: %s\n%s" % (vp, "\n".join(zsl))) - zsl = [self.ar.wsalt, str(file.size)] + [x[0] for x in file.kchunks] + zsl = [self.ar.wsalt, str(file.size)] + [x[0] for x in file.cids] zb = hashlib.sha512("\n".join(zsl).encode("utf-8")).digest()[:33] wark = ub64enc(zb).decode("utf-8") if self.ar.jw: