Commits

Moises Henriquez  committed d848f40

Do not offer the current / partition as a possible install target (Fix #21 @ VLCore/vinstall)

  • Participants
  • Parent commits e8b4ffe

Comments (0)

Files changed (1)

File vinstall/controller/mountpoints.py

 from vinstall.backend.media import Partition
 from vinstall.backend import mountpoints
 import os
-
+from vinstall.backend.utils import get_mounted
 
 class Mountpoint(Controller):
     """Setup target locations
     def init(self):
         self.config["mountpoints"] = []
         source = self.config["install_media"].device.device_path
-        self.partitions = [ p for p in Partition.all() if p.device_path != source ]
+	self.partitions = []
+	current_root = get_mounted("/")
+	for p in Partition.all():
+	    if p.device_path not in (source, current_root):
+		self.partitions.append(p)
 
     def render(self):
         """Show mount options