Skip to content

Commit

Permalink
Merge pull request #20911 from osmandapp/Fix_20741
Browse files Browse the repository at this point in the history
Fix "Regression: Route context card title broken #20741"
  • Loading branch information
Chumva authored Sep 26, 2024
2 parents 5da994e + 210a9e2 commit af053b3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@ object GpxUtilities {

fun writeGpxFile(file: KFile, gpxFile: GpxFile): KException? {
return try {
file.getParentFile()?.createDirectories()
if (KAlgorithms.isEmpty(gpxFile.path)) {
gpxFile.path = if (file.isAbsolute()) file.path() else file.absolutePath()
}
writeGpx(file, null, gpxFile, null)
} catch (e: KException) {
log.error("Failed to write gpx '$file.path()'", e)
Expand Down

0 comments on commit af053b3

Please sign in to comment.