[PC-BSD Commits] r19599 - in pcbsd/branches/9.1: overlays/desktop-overlay/usr/local/share/pcbsd/xstartup src-qt4/pc-mounttray

svn at pcbsd.org svn at pcbsd.org
Thu Oct 4 08:21:44 PDT 2012


Author: kris
Date: 2012-10-04 15:21:44 +0000 (Thu, 04 Oct 2012)
New Revision: 19599

Modified:
   pcbsd/branches/9.1/overlays/desktop-overlay/usr/local/share/pcbsd/xstartup/pc-mounttray.sh
   pcbsd/branches/9.1/src-qt4/pc-mounttray/mountTray.cpp
Log:

MFC two mount-tray fixes



Modified: pcbsd/branches/9.1/overlays/desktop-overlay/usr/local/share/pcbsd/xstartup/pc-mounttray.sh
===================================================================
--- pcbsd/branches/9.1/overlays/desktop-overlay/usr/local/share/pcbsd/xstartup/pc-mounttray.sh	2012-10-04 15:11:56 UTC (rev 19598)
+++ pcbsd/branches/9.1/overlays/desktop-overlay/usr/local/share/pcbsd/xstartup/pc-mounttray.sh	2012-10-04 15:21:44 UTC (rev 19599)
@@ -2,6 +2,6 @@
 
 if [ "`id -u`" = "0" ] ; then return ; fi
 
-sleep 10
+sleep 20
 sudo pc-mounttray &
 

Modified: pcbsd/branches/9.1/src-qt4/pc-mounttray/mountTray.cpp
===================================================================
--- pcbsd/branches/9.1/src-qt4/pc-mounttray/mountTray.cpp	2012-10-04 15:11:56 UTC (rev 19598)
+++ pcbsd/branches/9.1/src-qt4/pc-mounttray/mountTray.cpp	2012-10-04 15:21:44 UTC (rev 19599)
@@ -320,7 +320,14 @@
     //QMessageBox::warning(this,tr("Unknown Device Filesystem"),tr("The filesystem on this device is unknown and cannot be mounted at this time") );
     //return FALSE;
   }
-  
+  //Make sure the mntpoint is available
+  QDir mpd(mntpoint);
+  if(mpd.exists()){
+    //Remove the existing directory (will work only if it is empty)
+    mpd.cdUp();
+    mpd.rmdir(mntpoint);
+  }
+  //Prepare the commands to run
   QString cmd1 = "mkdir " + mntpoint;
   QString cmd2 = fstype + " " +fsopts + " " + dev + " " + mntpoint;
   



More information about the Commits mailing list