From 9e78cf74f167335f9fce41bdb3b70de0c98ff1d3 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 2 Feb 2026 17:22:38 +0100 Subject: [PATCH] fix check --- utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index 0e697fb..3bd95b4 100644 --- a/utils.py +++ b/utils.py @@ -44,10 +44,13 @@ def remove_deselected_files(): def needs_update(src, out): mtime_src = os.lstat(src).st_mtime - mtime_out = os.lstat(out).st_mtime + if os.path.exists(out) + mtime_out = os.lstat(out).st_mtime + else: + mtime_out = 0 #print("compare", src, out) #print("ts", mtime_src, mtime_out, mtime_src > mtime_out) - if not os.path.exists(out) or mtime_src > mtime_out: + if mtime_src > mtime_out: return True return False