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')