diff options
author | bigbiff bigbiff <bigbiff@teamw.in> | 2016-09-06 03:04:51 +0200 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2017-11-27 16:32:30 +0100 |
commit | 19fb79c722622ac4a068e258501ab4b161420cda (patch) | |
tree | 87791149590c18e019d20818dd61279e3b4829b2 /gui/fileselector.cpp | |
parent | Improve greek translation (diff) | |
download | android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.tar android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.tar.gz android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.tar.bz2 android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.tar.lz android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.tar.xz android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.tar.zst android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.zip |
Diffstat (limited to 'gui/fileselector.cpp')
-rw-r--r-- | gui/fileselector.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gui/fileselector.cpp b/gui/fileselector.cpp index a992b80ea..c4aaab168 100644 --- a/gui/fileselector.cpp +++ b/gui/fileselector.cpp @@ -30,6 +30,7 @@ extern "C" { #include "objects.hpp" #include "../data.hpp" #include "../twrp-functions.hpp" +#include "../adbbu/libtwadbbu.hpp" int GUIFileSelector::mSortOrder = 0; @@ -270,7 +271,10 @@ int GUIFileSelector::GetFileList(const std::string folder) mFolderList.push_back(data); } else if (data.fileType == DT_REG || data.fileType == DT_LNK || data.fileType == DT_BLK) { if (mExtn.empty() || (data.fileName.length() > mExtn.length() && data.fileName.substr(data.fileName.length() - mExtn.length()) == mExtn)) { - mFileList.push_back(data); + if (mExtn == ".ab" && twadbbu::Check_ADB_Backup_File(path)) + mFolderList.push_back(data); + else + mFileList.push_back(data); } } } @@ -354,8 +358,8 @@ void GUIFileSelector::NotifySelect(size_t item_selected) cwd += str; } - if (mShowNavFolders == 0 && mShowFiles == 0) { - // nav folders and files are disabled, this is probably the restore list and we need to save chosen location to mVariable instead of mPathVar + if (mShowNavFolders == 0 && (mShowFiles == 0 || mExtn == ".ab")) { + // this is probably the restore list and we need to save chosen location to mVariable instead of mPathVar DataManager::SetValue(mVariable, cwd); } else { // We are changing paths, so we need to set mPathVar |