[PC-BSD Commits] r6026 - pcbsd/trunk/SoftwareManager
svn at pcbsd.org
svn at pcbsd.org
Thu Jan 21 16:37:48 PST 2010
Author: kris
Date: 2010-01-21 16:37:48 -0800 (Thu, 21 Jan 2010)
New Revision: 6026
Modified:
pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp
Log:
Fixed a bug with doing upgrades of PBI's, the QFile::rename command doesn't seem to take place immediately :(
Modified: pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp
===================================================================
--- pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp 2010-01-21 22:38:25 UTC (rev 6025)
+++ pcbsd/trunk/SoftwareManager/softmanager-pbiupdate.cpp 2010-01-22 00:37:48 UTC (rev 6026)
@@ -269,7 +269,7 @@
void PBM::markPBIForUpdate(PBI *item)
{
// Set the download file
- QString downfile = item->getName().replace(" ", "") + "-" + item->getVersion() + ".pbi";
+ QString downfile = item->getName().replace(" ", "") + "-" + item->getDownloadVersion() + ".pbi";
item->setDownloadFile(customTmpDir + "/" + downfile);
// Mark the status as PBIUpgrading
@@ -435,7 +435,10 @@
QFile::remove(item->getDownloadFile() );
}
- QFile::rename(item->getDownloadFile() + ".tmp", item->getDownloadFile());
+ // Rename the .tmp file to the regular PBI name
+ QString mvcmd = "mv " + item->getDownloadFile() + ".tmp" \
+ + " " + item->getDownloadFile();
+ system(mvcmd.toLatin1());
// The download finished, lets start the install / upgrade
slotStartPBIInstall();
More information about the Commits
mailing list