From 8271ec141bd215fb5f5803d47aa1abcc7224f873 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 2 Oct 2016 20:09:30 +0200 Subject: [PATCH] use proper path at the initial breadcrumbs --- .../java/com/simplemobiletools/filemanager/Breadcrumbs.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/simplemobiletools/filemanager/Breadcrumbs.java b/app/src/main/java/com/simplemobiletools/filemanager/Breadcrumbs.java index cdbcca51..23f0c0c2 100644 --- a/app/src/main/java/com/simplemobiletools/filemanager/Breadcrumbs.java +++ b/app/src/main/java/com/simplemobiletools/filemanager/Breadcrumbs.java @@ -104,13 +104,15 @@ public class Breadcrumbs extends LinearLayout implements View.OnClickListener { final boolean showFullPath = Config.newInstance(getContext()).getShowFullPath(); final String basePath = Environment.getExternalStorageDirectory().toString(); String tempPath = fullPath; + String currPath = basePath; if (!showFullPath) { tempPath = fullPath.replace(basePath, getContext().getString(R.string.initial_breadcrumb) + "/"); + } else { + currPath = "/"; } removeAllViewsInLayout(); final String[] dirs = tempPath.split("/"); - String currPath = basePath; for (int i = 0; i < dirs.length; i++) { final String dir = dirs[i]; if (i > 0) { @@ -122,7 +124,7 @@ public class Breadcrumbs extends LinearLayout implements View.OnClickListener { if (dir.isEmpty()) continue; - final FileDirItem item = new FileDirItem(i > 0 ? currPath : basePath, dir, true, 0, 0); + final FileDirItem item = new FileDirItem(currPath, dir, true, 0, 0); addBreadcrumb(item, i > 0 || showFullPath); }