summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-01-25 22:47:37 +0100
committerDees_Troy <dees_troy@teamw.in>2013-01-28 16:20:03 +0100
commit3ee47bc2ab41e5bf10774fc7f06ae6ca43d7e78e (patch)
treeaecfd88ef42f1e696c788ab2ff1110ac009b3807 /gui
parentRemove thread logging from actions.cpp (diff)
downloadandroid_bootable_recovery-3ee47bc2ab41e5bf10774fc7f06ae6ca43d7e78e.tar
android_bootable_recovery-3ee47bc2ab41e5bf10774fc7f06ae6ca43d7e78e.tar.gz
android_bootable_recovery-3ee47bc2ab41e5bf10774fc7f06ae6ca43d7e78e.tar.bz2
android_bootable_recovery-3ee47bc2ab41e5bf10774fc7f06ae6ca43d7e78e.tar.lz
android_bootable_recovery-3ee47bc2ab41e5bf10774fc7f06ae6ca43d7e78e.tar.xz
android_bootable_recovery-3ee47bc2ab41e5bf10774fc7f06ae6ca43d7e78e.tar.zst
android_bootable_recovery-3ee47bc2ab41e5bf10774fc7f06ae6ca43d7e78e.zip
Diffstat (limited to 'gui')
-rw-r--r--gui/fileselector.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/gui/fileselector.cpp b/gui/fileselector.cpp
index aecdd253c..38eaadd20 100644
--- a/gui/fileselector.cpp
+++ b/gui/fileselector.cpp
@@ -31,6 +31,7 @@ extern "C" {
#include "rapidxml.hpp"
#include "objects.hpp"
#include "../data.hpp"
+#include "../twrp-functions.hpp"
#define TW_FILESELECTOR_UP_A_LEVEL "(Up A Level)"
@@ -787,9 +788,12 @@ int GUIFileSelector::GetFileList(const std::string folder)
continue;
if (data.fileName == ".." && folder == "/")
continue;
- if (data.fileName == "..")
+ if (data.fileName == "..") {
data.fileName = TW_FILESELECTOR_UP_A_LEVEL;
- data.fileType = de->d_type;
+ data.fileType = DT_DIR;
+ } else {
+ data.fileType = de->d_type;
+ }
std::string path = folder + "/" + data.fileName;
stat(path.c_str(), &st);
@@ -801,6 +805,9 @@ int GUIFileSelector::GetFileList(const std::string folder)
data.lastModified = st.st_mtime;
data.lastStatChange = st.st_ctime;
+ if (data.fileType == DT_UNKNOWN) {
+ data.fileType = TWFunc::Get_D_Type_From_Stat(path);
+ }
if (data.fileType == DT_DIR)
{
if (mShowNavFolders || (data.fileName != "." && data.fileName != TW_FILESELECTOR_UP_A_LEVEL))