From dedf11a07e3b2bfa254ca8da86f615e300a37bf4 Mon Sep 17 00:00:00 2001 From: German Service Network Date: Sun, 4 Sep 2022 14:05:52 +0200 Subject: [PATCH] Correct tabsize by manual merge error --- raspbmirror.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/raspbmirror.py b/raspbmirror.py index cf0b56d..b6db72a 100644 --- a/raspbmirror.py +++ b/raspbmirror.py @@ -215,12 +215,12 @@ def getfile(path,sha256,size): return # no download needed but rename is if os.path.isfile(path): # file already exists if (size == os.path.getsize(path)): #no point reading the data and calculating a hash if the size does not match - if (not args.repair) and (path in oldknownfiles) and (not havenewfile): - #shortcut exit if file is unchanged, we skip this if a "new" file was detected because - #that means some sort of update was going on to the file and may need to be finished/cleaned up. - oldsha256,oldsize,oldstatus = oldknownfiles[path] - if (oldsha256 == sha256) and (oldsize == size) and (oldstatus != 'F'): - return # no update needed + if (not args.repair) and (path in oldknownfiles) and (not havenewfile): + #shortcut exit if file is unchanged, we skip this if a "new" file was detected because + #that means some sort of update was going on to the file and may need to be finished/cleaned up. + oldsha256,oldsize,oldstatus = oldknownfiles[path] + if (oldsha256 == sha256) and (oldsize == size) and (oldstatus != 'F'): + return # no update needed sha256hashed, tl = getfilesha256andsize(path) if (sha256 == sha256hashed) and (size == tl): logging.info('existing file '+path.decode('ascii')+' matched by hash and size') -- 2.43.0