Ignore:
Timestamp:
06/23/14 19:51:11 (9 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.3, releng/10.1, releng/10.1.1
Children:
bb3f61c
Parents:
060b819
Message:

Clean up the directory searching and recursive removal in lumina-fm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lumina/lumina-fm/FODialog.cpp

    rb3b0822 r08438b40  
    6969    //Now recursively add any subdirectories and their contents 
    7070    QStringList subdirs = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::NoSort); 
    71     for(int i=0; i<subdirs.length(); i++){ out << subfiles(subdirs[i]); } 
     71    for(int i=0; i<subdirs.length(); i++){ out << subfiles(dir.absoluteFilePath(subdirs[i])); } 
    7272  } 
    7373  out << dirpath; //always put the parent directory after all the contents 
     
    9090  QStringList err;       
    9191  for(int i=0; i<items.length(); i++){ 
    92     if(QFileInfo(items[i]).isDir()){ 
     92    if(items[i]==path){ 
    9393      QDir dir; 
    94       if( !dir.rmdir(items[i]) ){ err << items[i]; } 
     94      if( !dir.rmdir(items[i]) ){ err << items[i]; }         
     95    }else if(QFileInfo(items[i]).isDir()){ 
     96      err << removeItem(items[i]); 
    9597    }else{ 
    9698      if( !QFile::remove(items[i]) ){ err << items[i]; } 
Note: See TracChangeset for help on using the changeset viewer.