diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/TracksCard.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/TracksCard.java index 3312371a56..5becff9bad 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/TracksCard.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/cards/TracksCard.java @@ -62,10 +62,12 @@ public class TracksCard extends BaseCard { @SuppressLint("DefaultLocale") @Override protected void updateContent() { + String gpxDir = app.getAppPath(IndexConstants.GPX_INDEX_DIR).getAbsolutePath(); final List list = new ArrayList<>(); for (GPXFile gpx : gpxFiles) { File f = new File(gpx.path); - list.add(new GpxItem(GpxUiHelper.getGpxTitle(f.getName()), gpx, new GPXInfo(f.getName(), f.lastModified(), f.length()))); + String fileName = gpx.path.startsWith(gpxDir) ? gpx.path.substring(gpxDir.length() + 1) : f.getName(); + list.add(new GpxItem(GpxUiHelper.getGpxTitle(f.getName()), gpx, new GPXInfo(fileName, f.lastModified(), f.length()))); } Collections.sort(list, new Comparator() { @Override