BE: handle missing buildtimestamp.txt

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2025-10-31 08:12:38 +11:00
parent 512dedff4e
commit 63d6410bb4
2 changed files with 18 additions and 3 deletions

View File

@@ -378,7 +378,14 @@ def importConfigs (pm, db, all_plugins):
# HANDLE APP was upgraded message - clear cache
# Check if app was upgraded
with open(applicationPath + '/front/buildtimestamp.txt', 'r') as f:
build_timestamp_path = os.path.join(applicationPath, 'front/buildtimestamp.txt')
# Ensure the build timestamp file exists and has an initial value
if not os.path.exists(build_timestamp_path):
with open(build_timestamp_path, 'w') as f:
f.write("0")
with open(build_timestamp_path, 'r') as f:
buildTimestamp = int(f.read().strip())
cur_version = conf.VERSION