-rw-r--r-- | noncore/settings/aqpkg/ipkg.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp index 1efe030..407abe9 100644 --- a/noncore/settings/aqpkg/ipkg.cpp +++ b/noncore/settings/aqpkg/ipkg.cpp | |||
@@ -389,65 +389,65 @@ int Ipkg :: executeIpkgCommand( QString &cmd, const QString option ) | |||
389 | } | 389 | } |
390 | */ | 390 | */ |
391 | 391 | ||
392 | void Ipkg :: linkPackage( const QString &packFileName, const QString &dest, const QString &destDir ) | 392 | void Ipkg :: linkPackage( const QString &packFileName, const QString &dest, const QString &destDir ) |
393 | { | 393 | { |
394 | if ( dest == "root" || dest == "/" ) | 394 | if ( dest == "root" || dest == "/" ) |
395 | return; | 395 | return; |
396 | 396 | ||
397 | qApp->processEvents(); | 397 | qApp->processEvents(); |
398 | QStringList *fileList = getList( packFileName, destDir ); | 398 | QStringList *fileList = getList( packFileName, destDir ); |
399 | qApp->processEvents(); | 399 | qApp->processEvents(); |
400 | processFileList( fileList, destDir ); | 400 | processFileList( fileList, destDir ); |
401 | delete fileList; | 401 | delete fileList; |
402 | } | 402 | } |
403 | 403 | ||
404 | QStringList* Ipkg :: getList( const QString &packageFilename, const QString &destDir ) | 404 | QStringList* Ipkg :: getList( const QString &packageFilename, const QString &destDir ) |
405 | { | 405 | { |
406 | QString packageFileDir = destDir+"/usr/lib/ipkg/info/"+packageFilename+".list"; | 406 | QString packageFileDir = destDir+"/usr/lib/ipkg/info/"+packageFilename+".list"; |
407 | QFile f( packageFileDir ); | 407 | QFile f( packageFileDir ); |
408 | 408 | ||
409 | cout << "Try to open " << packageFileDir << endl; | 409 | cout << "Try to open " << packageFileDir << endl; |
410 | if ( !f.open(IO_ReadOnly) ) | 410 | if ( !f.open(IO_ReadOnly) ) |
411 | { | 411 | { |
412 | // Couldn't open from dest, try from / | 412 | // Couldn't open from dest, try from / |
413 | cout << "Could not open:" << packageFileDir << endl; | 413 | cout << "Could not open:" << packageFileDir << endl; |
414 | f.close(); | 414 | f.close(); |
415 | 415 | ||
416 | packageFileDir = "/usr/lib/ipkg/info/"+packageFilename+".list"; | 416 | packageFileDir = "/usr/lib/ipkg/info/"+packageFilename+".list"; |
417 | f.setName( packageFileDir ); | 417 | f.setName( packageFileDir ); |
418 | qDebug( "Try to open %s", packageFileDir.latin1() ); | 418 | qDebug( "Try to open %s", packageFileDir.latin1() ); |
419 | if ( ! f.open(IO_ReadOnly) ) | 419 | if ( ! f.open(IO_ReadOnly) ) |
420 | { | 420 | { |
421 | qDebug( "Could not open: %s", packageFileDir ); | 421 | qDebug( "Could not open: %s", packageFileDir.latin1() ); |
422 | emit outputText( QString( "Could not open :" ) + packageFileDir ); | 422 | emit outputText( QString( "Could not open :" ) + packageFileDir ); |
423 | return (QStringList*)0; | 423 | return (QStringList*)0; |
424 | } | 424 | } |
425 | } | 425 | } |
426 | QStringList *fileList = new QStringList(); | 426 | QStringList *fileList = new QStringList(); |
427 | QTextStream t( &f ); | 427 | QTextStream t( &f ); |
428 | while ( !t.eof() ) | 428 | while ( !t.eof() ) |
429 | *fileList += t.readLine(); | 429 | *fileList += t.readLine(); |
430 | 430 | ||
431 | f.close(); | 431 | f.close(); |
432 | return fileList; | 432 | return fileList; |
433 | } | 433 | } |
434 | 434 | ||
435 | void Ipkg :: processFileList( const QStringList *fileList, const QString &destDir ) | 435 | void Ipkg :: processFileList( const QStringList *fileList, const QString &destDir ) |
436 | { | 436 | { |
437 | if ( !fileList || fileList->isEmpty() ) | 437 | if ( !fileList || fileList->isEmpty() ) |
438 | return; | 438 | return; |
439 | 439 | ||
440 | QString baseDir = ROOT; | 440 | QString baseDir = ROOT; |
441 | 441 | ||
442 | if ( createLinks == true ) | 442 | if ( createLinks == true ) |
443 | { | 443 | { |
444 | for ( uint i=0; i < fileList->count(); i++ ) | 444 | for ( uint i=0; i < fileList->count(); i++ ) |
445 | { | 445 | { |
446 | processLinkDir( (*fileList)[i], baseDir, destDir ); | 446 | processLinkDir( (*fileList)[i], baseDir, destDir ); |
447 | qApp->processEvents(); | 447 | qApp->processEvents(); |
448 | } | 448 | } |
449 | } | 449 | } |
450 | else | 450 | else |
451 | { | 451 | { |
452 | for ( int i = fileList->count()-1; i >= 0 ; i-- ) | 452 | for ( int i = fileList->count()-1; i >= 0 ; i-- ) |
453 | { | 453 | { |