diff options
-rw-r--r-- | project/src/FileManagerForm.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/project/src/FileManagerForm.cpp b/project/src/FileManagerForm.cpp index fae7561..30eebe9 100644 --- a/project/src/FileManagerForm.cpp +++ b/project/src/FileManagerForm.cpp @@ -299,7 +299,10 @@ FileManagerForm::GetDirs(Tizen::Base::String dirPath) Tizen::Io::DirEntry dirEntry = pDirEnum->GetCurrentDirEntry(); if (CheckExt(dirEntry.GetName()) || dirEntry.IsDirectory()) { - __files.Add(dirEntry.GetName()); + if(dirEntry.GetName().CompareTo("..") == 0 || (Tizen::Io::File::GetAttributes(dirPath + "/" + dirEntry.GetName(), fileAtt) == E_SUCCESS && !fileAtt.IsHidden())) + { + __files.Add(dirEntry.GetName()); + } } } @@ -309,7 +312,12 @@ FileManagerForm::GetDirs(Tizen::Base::String dirPath) __files.Remove("."); - if (dirPath.CompareTo(ROOT_PATH) == 0) + String rootPath = ROOT_PATH; + if (rootPath.EndsWith("/")) + { + rootPath.Remove(rootPath.GetLength() - 1, 1); + } + if (dirPath.CompareTo(rootPath) == 0) { __files.Remove(".."); } |