Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.database.Cursor;
import android.util.Log;

import net.osmtracker.db.DataHelper;
import net.osmtracker.exception.ExportTrackException;

import java.io.File;
Expand All @@ -25,9 +26,10 @@ public abstract class ExportToTempFileTask extends ExportTrackTask {
public ExportToTempFileTask(Context context, long trackId) {
super(context, trackId);
try {
tmpFile = File.createTempFile("osm-upload", ".gpx", context.getCacheDir());
tmpFile = new File(context.getCacheDir(), new DataHelper(context).getTrackById(trackId).getName()+"_OSMTracker.gpx");
Log.d(TAG, "Temporary file: " + tmpFile.getAbsolutePath());
} catch (IOException ioe) {

} catch (Exception ioe) {
Log.e(TAG, "Could not create temporary file", ioe);
throw new IllegalStateException("Could not create temporary file", ioe);
}
Expand Down
Loading