fix symlink bind mount dirname
authorGui Chen <gui.chen@intel.com>
Thu, 16 May 2013 01:58:41 +0000 (21:58 -0400)
committerGui Chen <gui.chen@intel.com>
Thu, 16 May 2013 01:58:41 +0000 (21:58 -0400)
Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/utils/fs_related.py

index 817a016..ae8799d 100644 (file)
@@ -114,7 +114,8 @@ class BindChrootMount:
         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))
+                self.src = os.path.abspath(os.path.join(os.path.dirname(src),
+                                                        self.src))
 
         if not dest:
             dest = self.src