From 4d8b5418b1cf218ef9746674ca5935a7f4f3983e Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 31 Jul 2015 10:21:17 +0100 Subject: [PATCH] [Plugin] fix handling of symlinks in non-sysroot environments Signed-off-by: Bryn M. Reeves --- sos/plugins/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index aed7496..6731b28 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -163,6 +163,8 @@ class Plugin(object): return os.path.join(self.sysroot, path) def strip_sysroot(self, path): + if not self.use_sysroot(): + return path if path.startswith(self.sysroot): return path[len(self.sysroot):] return path -- 1.8.3.1