[PC-BSD Commits] r6165 - pcbsd/trunk/SoftwareManager

svn at pcbsd.org svn at pcbsd.org
Wed Feb 3 07:36:46 PST 2010


Author: kris
Date: 2010-02-03 07:36:46 -0800 (Wed, 03 Feb 2010)
New Revision: 6165

Modified:
   pcbsd/trunk/SoftwareManager/pbi.cpp
Log:

Updated software manager to be able to remove 7.x PBIs properly



Modified: pcbsd/trunk/SoftwareManager/pbi.cpp
===================================================================
--- pcbsd/trunk/SoftwareManager/pbi.cpp	2010-02-03 14:57:09 UTC (rev 6164)
+++ pcbsd/trunk/SoftwareManager/pbi.cpp	2010-02-03 15:36:46 UTC (rev 6165)
@@ -27,6 +27,7 @@
 #include <qtranslator.h>
 #include <qobject.h>
 #include <QFile>
+#include <QDir>
 
 PBI::PBI(QTreeWidget *listbox) : QTreeWidgetItem(listbox)
 {
@@ -296,6 +297,21 @@
    tmp = name;
    tmp.replace(" ", "");
    ProgDirName = tmp;
+   tmp = version;
+   tmp.replace(" ", "");
+   ProgDirName = ProgDirName + tmp;
+
+   // Check if this program dir exists
+   QDir testDir;
+   testDir.setPath("/Programs/" + ProgDirName);
+   if ( testDir.exists() )
+     return ProgDirName;
+
+   // Else return the default 8.x format name
+   tmp = name;
+   tmp.replace(" ", "");
+   ProgDirName = tmp;
+
    return ProgDirName;
 }
 



More information about the Commits mailing list