fix relative symbolic link in bind mount
authorGui Chen <gui.chen@intel.com>
Wed, 15 May 2013 12:11:36 +0000 (08:11 -0400)
committerGui Chen <gui.chen@intel.com>
Wed, 15 May 2013 12:11:36 +0000 (08:11 -0400)
Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/utils/fs_related.py

index 86f947b..817a016 100644 (file)
@@ -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