ensure tmp files are not processed

This commit is contained in:
Jason Ertel
2022-12-05 10:31:09 -05:00
parent 86c31c129a
commit 69c5a9dd90

View File

@@ -47,7 +47,7 @@ def checkexisting():
logging.error("Failed to process file: " + file) logging.error("Failed to process file: " + file)
def checksum(filename): def checksum(filename):
if os.path.isfile(filename) && "/tmp/" not in filename: if os.path.isfile(filename) and "/tmp/" not in filename:
with open(filename, 'rb') as afile: with open(filename, 'rb') as afile:
logging.info("Processing file: " + filename) logging.info("Processing file: " + filename)
shawnuff = hashlib.sha1() shawnuff = hashlib.sha1()