diff --git a/MyTracks/res/values/strings.xml b/MyTracks/res/values/strings.xml
index d4533c632..1fe178933 100644
--- a/MyTracks/res/values/strings.xml
+++ b/MyTracks/res/values/strings.xml
@@ -1008,10 +1008,6 @@ limitations under the License.
translation_description="When deleting multiple markers, the confirmation message.">
All markers for this track will be permanently deleted from the device.
-
- Unable to insert a photo marker. Try again.
-
{
if (tracks.length == 0) {
return false;
}
+
Track track = tracks[0];
boolean useKmz = trackFileFormat == TrackFileFormat.KML && !playTrack;
String extension = useKmz ? KmzTrackExporter.KMZ_EXTENSION : trackFileFormat.getExtension();
-
- // Make sure the file doesn't exist yet (possibly by changing the filename)
- String fileName = FileUtils.buildUniqueFileName(directory, track.getName(), extension);
- if (fileName == null) {
- Log.d(TAG, "Unable to get a unique filename for " + track.getName());
- return false;
- }
-
FileTrackExporter fileTrackExporter = new FileTrackExporter(myTracksProviderUtils, tracks,
trackFileFormat.newTrackWriter(context, playTrack), new TrackExporterListener() {
@@ -212,6 +205,7 @@ public class SaveAsyncTask extends AsyncTask {
trackExporter = useKmz ? new KmzTrackExporter(myTracksProviderUtils, fileTrackExporter, tracks)
: fileTrackExporter;
+ String fileName = FileUtils.buildUniqueFileName(directory, track.getName(), extension);
File file = new File(directory, fileName);
FileOutputStream fileOutputStream = null;
try {