[PC-BSD Commits] r12235 - pcbsd/current/src-qt4/pc-sysinstaller

svn at pcbsd.org svn at pcbsd.org
Mon Aug 22 12:11:43 PDT 2011


Author: kris
Date: 2011-08-22 12:11:42 -0700 (Mon, 22 Aug 2011)
New Revision: 12235

Modified:
   pcbsd/current/src-qt4/pc-sysinstaller/dialogFileSystem.cpp
   pcbsd/current/src-qt4/pc-sysinstaller/dialogZFSMount.cpp
Log:

Auto-correct if the user tries a /home mount-point into /usr/home



Modified: pcbsd/current/src-qt4/pc-sysinstaller/dialogFileSystem.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/dialogFileSystem.cpp	2011-08-22 17:44:35 UTC (rev 12234)
+++ pcbsd/current/src-qt4/pc-sysinstaller/dialogFileSystem.cpp	2011-08-22 19:11:42 UTC (rev 12235)
@@ -690,7 +690,14 @@
     if ( lineEditMount->text().isEmpty() && comboDiskType->currentText() != "SWAP" )
      ready = false;
 
+    // Convert /home -> /usr/home
     if ( ! lineEditMount->text().isEmpty() \
+      && lineEditMount->text().indexOf("/home") == 0 \
+      && comboDiskType->currentText() != "SWAP" ) {
+      lineEditMount->setText("/usr/home");
+    }
+
+    if ( ! lineEditMount->text().isEmpty() \
       && lineEditMount->text().indexOf("/") != 0 \
       && comboDiskType->currentText() != "SWAP" ) {
      labelStatus->setText(tr("Error: Invalid Mount Point."));

Modified: pcbsd/current/src-qt4/pc-sysinstaller/dialogZFSMount.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/dialogZFSMount.cpp	2011-08-22 17:44:35 UTC (rev 12234)
+++ pcbsd/current/src-qt4/pc-sysinstaller/dialogZFSMount.cpp	2011-08-22 19:11:42 UTC (rev 12235)
@@ -47,6 +47,10 @@
      return;
   }
 
+  // Setup /home -> /usr/home
+  if ( tmp.indexOf("/home") == 0 )
+     tmp.replace("/home", "/usr/home");
+
   emit saved(lineZFSMount->text());
   close();
 }



More information about the Commits mailing list