From a904a76bd880ab3f944a828704b26cffbd91b273 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 4 Sep 2016 22:57:52 +0200 Subject: [PATCH] hide hidden files and folders if set so --- .../filemanager/dialogs/SelectFolderDialog.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/com/simplemobiletools/filemanager/dialogs/SelectFolderDialog.java b/app/src/main/java/com/simplemobiletools/filemanager/dialogs/SelectFolderDialog.java index b3a5362e..77bb9f17 100644 --- a/app/src/main/java/com/simplemobiletools/filemanager/dialogs/SelectFolderDialog.java +++ b/app/src/main/java/com/simplemobiletools/filemanager/dialogs/SelectFolderDialog.java @@ -12,6 +12,7 @@ import android.widget.AdapterView; import android.widget.ListView; import com.simplemobiletools.filemanager.Breadcrumbs; +import com.simplemobiletools.filemanager.Config; import com.simplemobiletools.filemanager.R; import com.simplemobiletools.filemanager.Utils; import com.simplemobiletools.filemanager.adapters.ItemsAdapter; @@ -99,6 +100,7 @@ public class SelectFolderDialog extends DialogFragment { } private List getItems(String path) { + final boolean showHidden = Config.newInstance(getContext()).getShowHidden(); final List items = new ArrayList<>(); final File base = new File(path); File[] files = base.listFiles(); @@ -107,6 +109,9 @@ public class SelectFolderDialog extends DialogFragment { if (!file.isDirectory()) continue; + if (file.isHidden() && !showHidden) + continue; + final String curPath = file.getAbsolutePath(); final String curName = Utils.getFilename(curPath); int children = getChildren(file);