only check files on inotify

This commit is contained in:
Jason Ertel
2022-12-05 10:01:40 -05:00
parent f06443f3dd
commit d7f60a0e58

View File

@@ -74,6 +74,7 @@ def process(filename, hizash):
class CreatedEventHandler(FileSystemEventHandler): class CreatedEventHandler(FileSystemEventHandler):
def on_created(self, event): def on_created(self, event):
filename = event.src_path filename = event.src_path
if os.path.isfile(filename):
logging.info("Found new file: " + filename) logging.info("Found new file: " + filename)
checksum(filename) checksum(filename)