summaryrefslogtreecommitdiff
path: root/libopie
Side-by-side diff
Diffstat (limited to 'libopie') (more/less context) (show whitespace changes)
-rw-r--r--libopie/ofileselector.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc
index 6a6a300..7481360 100644
--- a/libopie/ofileselector.cc
+++ b/libopie/ofileselector.cc
@@ -1201,8 +1201,9 @@ void OFileSelector::reparse()
m_mimeCheck->clear();
// let's find possible mimetypes
QDir dir( m_currentDir );
+ if( dir.exists() ){
dir.setFilter( QDir::Files | QDir::Readable );
dir.setSorting( QDir::Size );
const QFileInfoList *list = dir.entryInfoList();
QFileInfoListIterator it( *list );
@@ -1224,8 +1225,9 @@ void OFileSelector::reparse()
updateMimeCheck();
m_mimeCheck->setCurrentItem( indexByString( m_mimeCheck, currentMimeType ) );
currentMimeType = m_mimeCheck->currentText();
}
+ }
}else { // no autoMime
// let the mimetype be set from out side the m_mimeCheck FEATURE
if( m_shChooser ){
@@ -1236,8 +1238,9 @@ void OFileSelector::reparse()
// now we got our mimetypes we can add the files
QDir dir( m_currentDir );
+ if( dir.exists() ){
int sort;
if ( m_case )
sort = (QDir::IgnoreCase | QDir::Name | QDir::DirsFirst | QDir::Reversed);
else
@@ -1289,8 +1292,9 @@ void OFileSelector::reparse()
}
//qWarning( "%s", fi->fileName().latin1() );
++it;
} // of while loop
+ } // if ( dir.exists() )
m_View->sort();
if( m_shTool ){
m_location->insertItem( m_currentDir );