From 8c82a864c00bc0eabed062588a3a86fb2ee67506 Mon Sep 17 00:00:00 2001 From: Gui Chen Date: Wed, 15 May 2013 08:11:36 -0400 Subject: [PATCH] fix relative symbolic link in bind mount Signed-off-by: Gui Chen --- mic/utils/fs_related.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mic/utils/fs_related.py b/mic/utils/fs_related.py index 86f947b..817a016 100644 --- a/mic/utils/fs_related.py +++ b/mic/utils/fs_related.py @@ -113,6 +113,8 @@ class BindChrootMount: self.orig_src = self.src = src if os.path.islink(src): self.src = os.readlink(src) + if not self.src.startswith('/'): + self.src = os.path.abspath(os.path.join(src, self.src)) if not dest: dest = self.src -- 2.7.4