[PATCH rhel6-branch 2/4] Check for sane mountpoint in partition dialog (#592185)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Resolves: rhbz#592185

Display a message to the user when the mountpoint name they have
chosen is invalid. Skip checking when the format type has no mountpoint.
---
 iw/partition_dialog_gui.py |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py
index 85cf6df..3e5d77f 100644
--- a/iw/partition_dialog_gui.py
+++ b/iw/partition_dialog_gui.py
@@ -30,6 +30,7 @@ from storage.devices import PartitionDevice, LUKSDevice
 from storage.deviceaction import *
 from partition_ui_helpers_gui import *
 from constants import *
+from partIntfHelpers import *
 
 import gettext
 _ = lambda x: gettext.ldgettext("anaconda", x)
@@ -110,7 +111,15 @@ class PartitionEditor:
                 return []
 
             mountpoint = self.mountCombo.get_children()[0].get_text()
-            if mountpoint:
+            (sensitive,) = self.mountCombo.get_properties('sensitive')
+            if sensitive and mountpoint:
+                msg = sanityCheckMountPoint(mountpoint)
+                if msg:
+                    self.intf.messageWindow(_("Mount Point Error"),
+                                            msg,
+                                            custom_icon="error")
+                    continue
+
                 used = False
                 for (mp, dev) in self.storage.mountpoints.iteritems():
                     if mp == mountpoint and \
-- 
1.6.6.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux