From 868966cd9dbb96ce3635d884e67e738b18658140 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Wed, 12 Sep 2018 16:11:07 +0100 Subject: [archive] canonicalise paths for link follow up Ensure that the canonical path is used when processing link follow up actions: the actual link path may contain one or more levels of symbolic links, leading to broken links if the link target path is assumed to be relative to the containing directory. Signed-off-by: Bryn M. Reeves --- sos/archive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sos/archive.py b/sos/archive.py index 7a7717de..483d66f4 100644 --- a/sos/archive.py +++ b/sos/archive.py @@ -421,7 +421,7 @@ class FileCacheArchive(Archive): (source, link_name, dest)) source_dir = os.path.dirname(link_name) - host_path_name = os.path.normpath(os.path.join(source_dir, source)) + host_path_name = os.path.realpath(os.path.join(source_dir, source)) dest_path_name = self.dest_path(host_path_name) if not os.path.exists(dest_path_name): -- cgit