From dd0f57248d6889c19d841ededa78c6574c862fb8 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 8 Jan 2020 20:27:59 +0100 Subject: logbot.py: use relative path for latest.html symlink - so it works on the mirrors, too --- logbot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/logbot.py b/logbot.py index 59ff280..7916bb8 100755 --- a/logbot.py +++ b/logbot.py @@ -344,13 +344,14 @@ class Logbot(SingleServerIRCBot): date = strftime("%Y-%m-%d") log_path = "%s/%s/%s.html" % (LOG_FOLDER, channel, date) + rel_log_path = "%s.html" % (date) # Create the log date index if it doesnt exist if not os.path.exists(log_path): write_string(log_path, html_header.replace("%title%", "%s | Logs for %s" % (channel_title, date))) if os.path.islink("%s/latest.html" % chan_path): os.unlink("%s/latest.html" % chan_path) - os.symlink(log_path, "%s/latest.html" % chan_path) + os.symlink(rel_log_path, "%s/latest.html" % chan_path) # Append date log append_line("%s/index.html" % chan_path, '%s' % (date, date)) -- cgit v1.2.3-70-g09d2