1. VectorLinux Core
  2. vinstall


Rodrigo Bistolfi  committed 43ebc43

mountpoints controller: remove leading "/" from mountpoint

We use os.path.join() to create a path like /mnt/TARGET/home:

>>> os.path.join("/mnt/TARGET", "home")

If you pass /home instead home, ie the absolute path, os.path.join()
will just return "/home", which is not what we want.

  • Participants
  • Parent commits 3c5ecba
  • Branches master

Comments (0)

Files changed (1)

File vinstall/controller/mountpoints.py

View file
  • Ignore whitespace
         for partition, mountpoint in data:
             if mountpoint not in ("/", "swap"):
+                if mountpoint.startswith("/"):
+                    mountpoint = mountpoint[1:]
                 d = os.path.join(target, mountpoint)
                 if not os.path.exists(d):
     def is_live(self):
         """Return True if install media is a Live CD
         install_media = self.config["install_media"]
         version = install_media.config.get("general", "version")