Skip to content

Commit 8271ec1

Browse files
committed
use proper path at the initial breadcrumbs
1 parent 0c30f58 commit 8271ec1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/src/main/java/com/simplemobiletools/filemanager/Breadcrumbs.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,15 @@ public void setInitialBreadcrumb(String fullPath) {
104104
final boolean showFullPath = Config.newInstance(getContext()).getShowFullPath();
105105
final String basePath = Environment.getExternalStorageDirectory().toString();
106106
String tempPath = fullPath;
107+
String currPath = basePath;
107108
if (!showFullPath) {
108109
tempPath = fullPath.replace(basePath, getContext().getString(R.string.initial_breadcrumb) + "/");
110+
} else {
111+
currPath = "/";
109112
}
110113

111114
removeAllViewsInLayout();
112115
final String[] dirs = tempPath.split("/");
113-
String currPath = basePath;
114116
for (int i = 0; i < dirs.length; i++) {
115117
final String dir = dirs[i];
116118
if (i > 0) {
@@ -122,7 +124,7 @@ public void setInitialBreadcrumb(String fullPath) {
122124
if (dir.isEmpty())
123125
continue;
124126

125-
final FileDirItem item = new FileDirItem(i > 0 ? currPath : basePath, dir, true, 0, 0);
127+
final FileDirItem item = new FileDirItem(currPath, dir, true, 0, 0);
126128
addBreadcrumb(item, i > 0 || showFullPath);
127129
}
128130

0 commit comments

Comments
 (0)