Fix #2484 - GPX tracks not shown unless extension is .gpx

Before this change, GPX tracks are not shown in "My Tracks" in "My Places"
unless they have a lowercase .gpx extension.

Such tracks are still shown in "Configure map", "GPX track..." but the
extension isn't removed like it is for tracks with a lowercase extension.
This has been fixed too.
This commit is contained in:
njohnston 2016-04-21 18:16:56 +00:00
parent b720d303df
commit 62c3ed0092
2 changed files with 2 additions and 2 deletions

View file

@ -92,7 +92,7 @@ public class GpxSelectionHelper {
if (i >= 0) {
name = name.substring(i + 1);
}
if (name.endsWith(".gpx")) {
if (name.toLowerCase().endsWith(".gpx")) {
name = name.substring(0, name.length() - 4);
}
name = name.replace('_', ' ');

View file

@ -646,7 +646,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
String sub = gpxSubfolder.length() == 0 ? gpxFile.getName() : gpxSubfolder + "/"
+ gpxFile.getName();
loadGPXFolder(gpxFile, result, loadTask, progress, sub);
} else if (gpxFile.isFile() && gpxFile.getName().endsWith(".gpx")) {
} else if (gpxFile.isFile() && gpxFile.getName().toLowerCase().endsWith(".gpx")) {
GpxInfo info = new GpxInfo();
info.subfolder = gpxSubfolder;
info.file = gpxFile;