From 561e3590d23f806c46e45cd50ca5b0dbb7b0b40a Mon Sep 17 00:00:00 2001 From: nomike Date: Wed, 18 Sep 2024 03:35:01 +0200 Subject: [PATCH] Fix path building. Improve assertion error message. --- templatehelper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templatehelper.py b/templatehelper.py index 3a03bc6..068855b 100644 --- a/templatehelper.py +++ b/templatehelper.py @@ -199,8 +199,8 @@ def getlastmodifiedfile(path): Recursively search for the newest file in the specified directory. """ - path = os.path.join('..', path) - assert os.path.isdir(path) + path = os.path.join('.', path) + assert os.path.isdir(path), f'{path} is not a directory!' newest = {"file": path, "timestamp": os.path.getmtime(path)} for root, dirs, files in os.walk(path): for directory in dirs: