summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index 11c0f97..7682d49 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -153,33 +153,33 @@ QStringList* PmIpkg::getList( QString packFileName, QString d )
*fileList += t.readLine();
}
f.close();
return fileList;
}
void PmIpkg::linkPackage( QString packFileName, QString dest )
{
if (dest == "root" || dest == "/" ) return;
QStringList *fileList = getList( packFileName, dest );
processFileList( fileList, dest );
delete fileList;
}
void PmIpkg::processFileList( QStringList *fileList, QString d )
{
- if (!fileList) return;
+ if (!fileList || fileList->isEmpty()) return;
for (uint i=0; i < fileList->count(); i++)
{
QString dest = settings->getDestinationUrlByName( d );
dest = dest==""?d:dest;
processLinkDir( (*fileList)[i], dest );
}
}
void PmIpkg::processLinkDir( QString file, QString dest )
{
pvDebug( 4,"PmIpkg::processLinkDir "+file+" to "+ dest);
if (linkOpp==createLink) pvDebug( 4,"opp: createLink");
if (linkOpp==removeLink) pvDebug( 4,"opp: removeLink");
if ( dest == "???" || dest == "" ) return;
QString destFile = file;
@@ -279,33 +279,33 @@ void PmIpkg::doIt()
runwindow->progress->setProgress(0);
show();
remove();
install();
}
void PmIpkg::remove()
{
if ( to_remove.count() == 0 ) return;
out(tr("Removing")+"\n"+tr("please wait")+"\n\n");
QStringList *fileList;
for (uint i=0; i < to_remove.count(); i++)
{
- if ( to_remove.at(i)->link() )fileList = getList( to_remove.at(i)->name(), to_remove.at(i)->dest() );
+ if ( to_remove.at(i)->link() ) fileList = getList( to_remove.at(i)->name(), to_remove.at(i)->dest() );
if ( runIpkg("remove " + to_remove.at(i)->installName(), to_remove.at(i)->dest() ))
{
runwindow->progress->setProgress( 1 );
linkOpp = removeLink;
to_remove.at(i)->processed();
pvDebug(3,"link "+QString::number(i));
if ( to_remove.at(i)->link() )
processFileList( fileList, to_remove.at(i)->dest() );
//pvDebug(3,"take "+QString::number(i)+" of "+QString::number(to_remove.count()));
//if ( to_remove.at(i) ) to_remove.take( i );
out("\n");
}else{
out(tr("Error while removing ")+to_remove.at(i)->name()+"\n");
if ( to_remove.at(i)->link() )
processFileList( fileList, to_remove.at(i)->dest() );