summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/impl/dir/dir_lister.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp b/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp
index ff33cf2..5706598 100644
--- a/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp
+++ b/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp
@@ -35,33 +35,36 @@ QString Dir_DirLister::defaultPath()const {
35 35
36QString Dir_DirLister::setStartPath( const QString& path ) { 36QString Dir_DirLister::setStartPath( const QString& path ) {
37 m_currentDir.cd( path ); 37 m_currentDir.cd( path );
38 if (!m_currentDir.exists() ) 38 if (!m_currentDir.exists() )
39 m_currentDir.cd(defaultPath()); 39 m_currentDir.cd(defaultPath());
40 40
41 41
42 return m_currentDir.absPath(); 42 return m_currentDir.absPath();
43} 43}
44 44
45QString Dir_DirLister::currentPath()const { 45QString Dir_DirLister::currentPath()const {
46 return m_currentDir.absPath(); 46 return m_currentDir.absPath();
47} 47}
48 48
49 49
50QStringList Dir_DirLister::folders()const { 50QStringList Dir_DirLister::folders()const {
51 return m_currentDir.entryList( QDir::Dirs ); 51 QStringList dirs = m_currentDir.entryList( QDir::Dirs );
52 dirs.remove(".");
53
54 return dirs;
52} 55}
53 56
54QStringList Dir_DirLister::recFiles(const QString&aPath,int currentDepth)const 57QStringList Dir_DirLister::recFiles(const QString&aPath,int currentDepth)const
55{ 58{
56 QStringList all; 59 QStringList all;
57 if (currentDepth>m_recDepth) return all; 60 if (currentDepth>m_recDepth) return all;
58 61
59 QString subPath; 62 QString subPath;
60 subPath = aPath; 63 subPath = aPath;
61 if (subPath.length()==0) { 64 if (subPath.length()==0) {
62 subPath="."; 65 subPath=".";
63 } 66 }
64 QDir checkDir(currentPath()+"/"+aPath); 67 QDir checkDir(currentPath()+"/"+aPath);
65 68
66 QStringList p = checkDir.entryList( QDir::Dirs ); 69 QStringList p = checkDir.entryList( QDir::Dirs );
67 all+=checkDir.entryList(m_Filter,QDir::Files|QDir::Readable); 70 all+=checkDir.entryList(m_Filter,QDir::Files|QDir::Readable);