[PC-BSD Commits] r17220 - pcbsd/current/src-qt4/EasyPBI

svn at pcbsd.org svn at pcbsd.org
Wed Jun 6 20:08:24 PDT 2012


Author: kenmoore
Date: 2012-06-07 03:08:24 +0000 (Thu, 07 Jun 2012)
New Revision: 17220

Modified:
   pcbsd/current/src-qt4/EasyPBI/mainwindow.cpp
Log:
Add an additional check for EasyPBI to make sure that the detected ports tree is actually filled.



Modified: pcbsd/current/src-qt4/EasyPBI/mainwindow.cpp
===================================================================
--- pcbsd/current/src-qt4/EasyPBI/mainwindow.cpp	2012-06-07 00:18:34 UTC (rev 17219)
+++ pcbsd/current/src-qt4/EasyPBI/mainwindow.cpp	2012-06-07 03:08:24 UTC (rev 17220)
@@ -260,8 +260,10 @@
     //Search the locations
     for(int i=0; i<portsLocations.size(); i++){
       if( QDir(portsLocations[i]).exists() ){
-	PORTS_DIR=portsLocations[i];
-	return TRUE;
+        if( QFile::exists(portsLocations[i]+"/COPYRIGHT") ){
+	  PORTS_DIR=portsLocations[i];
+	  return TRUE;
+	}
       }
     }
     //No ports tree detected - Display warning
@@ -275,7 +277,7 @@
     //Check to see if the ports are already installed
     if(Check_For_Ports(false)){
       if(PORTS_DIR=="/usr/ports"){
-	QMessageBox::warning(this, tr("Ports Installed"),tr("The FreeBSD ports tree is already available on this system\nTo update: run \"portsnap fetch extract\" as root"));
+	QMessageBox::warning(this, tr("Ports Installed"),tr("The FreeBSD ports tree is already available on this system")+"\n"+tr("To update: run \"portsnap fetch extract\" as root"));
 	return;
       }else{
 	QMessageBox verify;



More information about the Commits mailing list