Fix issue

This commit is contained in:
Victor Shcherb 2020-09-24 13:47:22 +02:00
parent 44d471c498
commit ef343e5423
2 changed files with 2 additions and 2 deletions

View file

@ -298,7 +298,7 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends MenuBottomSheetDial
if (folderName != null && !dir.getName().equals(folderName)) { if (folderName != null && !dir.getName().equals(folderName)) {
source = new File(dir, folderName); source = new File(dir, folderName);
} }
source = new File(source, fileName); source = new File(source, fileName + IndexConstants.GPX_FILE_EXT);
return source; return source;
} }

View file

@ -487,7 +487,7 @@ public class ChooseRouteFragment extends BaseOsmAndFragment implements ContextMe
String suggestedName = new SimpleDateFormat("EEE dd MMM yyyy", Locale.US).format(new Date()); String suggestedName = new SimpleDateFormat("EEE dd MMM yyyy", Locale.US).format(new Date());
fileName = FileUtils.createUniqueFileName(app, suggestedName, IndexConstants.GPX_INDEX_DIR, GPX_FILE_EXT); fileName = FileUtils.createUniqueFileName(app, suggestedName, IndexConstants.GPX_INDEX_DIR, GPX_FILE_EXT);
} else { } else {
fileName = new File(paramsBuilder.getFile().path).getName(); fileName = AndroidUtils.trimExtension(new File(paramsBuilder.getFile().path).getName());
} }
SaveAsNewTrackBottomSheetDialogFragment.showInstance(mapActivity.getSupportFragmentManager(), SaveAsNewTrackBottomSheetDialogFragment.showInstance(mapActivity.getSupportFragmentManager(),
ChooseRouteFragment.this, null, fileName, ChooseRouteFragment.this, null, fileName,