From 28fae442f881456138adbb542b0ab53001def0fe Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Tue, 24 Jun 2014 15:12:37 +0300 Subject: [PATCH] utils/make_latest_link: make the link target a relative path Absolute paths break mirroring of the server content. Fixes: TINF-636 Change-Id: I1af46a7ad5f6e98627412bd900c30d5a88fe19ef Signed-off-by: Markus Lehtonen --- common/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/utils.py b/common/utils.py index 5cbc10a..0e3c468 100644 --- a/common/utils.py +++ b/common/utils.py @@ -261,6 +261,7 @@ def make_latest_link(snapshot_path): snapshot_path (str): the local path to snapshot """ latest = os.path.join(snapshot_path, "../latest") + rel_path = os.path.basename(snapshot_path) if os.path.lexists(latest): os.unlink(latest) - os.symlink(snapshot_path, latest) + os.symlink(rel_path, latest) -- 2.7.4