]> git.gsnw.org Git - raspbmirror.git/commitdiff
Correct tabsize by manual merge error
authorGerman Service Network <support@gsnw.de>
Sun, 4 Sep 2022 12:05:52 +0000 (14:05 +0200)
committerGerman Service Network <support@gsnw.de>
Sun, 4 Sep 2022 12:05:52 +0000 (14:05 +0200)
raspbmirror.py

index cf0b56df6d5597fdb043f864513345da12ff74ed..b6db72a024aa0b28582e794b473d99de73f868c9 100644 (file)
@@ -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')