From 457c90f945c5c867b160dade4e755b9834bfcacc Mon Sep 17 00:00:00 2001 From: max-klaus Date: Wed, 3 Feb 2021 16:10:46 +0300 Subject: [PATCH] Fix kmz reading --- .../net/osmand/plus/importfiles/GpxOrFavouritesImportTask.java | 2 +- OsmAnd/src/net/osmand/plus/importfiles/KmzImportTask.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/importfiles/GpxOrFavouritesImportTask.java b/OsmAnd/src/net/osmand/plus/importfiles/GpxOrFavouritesImportTask.java index 9ae0e9b59b..7286c7ee19 100644 --- a/OsmAnd/src/net/osmand/plus/importfiles/GpxOrFavouritesImportTask.java +++ b/OsmAnd/src/net/osmand/plus/importfiles/GpxOrFavouritesImportTask.java @@ -63,7 +63,7 @@ class GpxOrFavouritesImportTask extends BaseLoadAsyncTask { ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { if (entry.getName().endsWith(ImportHelper.KML_SUFFIX)) { - InputStream gpxStream = convertKmlToGpxStream(is); + InputStream gpxStream = convertKmlToGpxStream(zis); if (gpxStream != null) { fileSize = gpxStream.available(); return GPXUtilities.loadGPXFile(gpxStream); diff --git a/OsmAnd/src/net/osmand/plus/importfiles/KmzImportTask.java b/OsmAnd/src/net/osmand/plus/importfiles/KmzImportTask.java index 6a145a04f7..2ed67cc0e4 100644 --- a/OsmAnd/src/net/osmand/plus/importfiles/KmzImportTask.java +++ b/OsmAnd/src/net/osmand/plus/importfiles/KmzImportTask.java @@ -49,7 +49,7 @@ class KmzImportTask extends BaseLoadAsyncTask { ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { if (entry.getName().endsWith(KML_SUFFIX)) { - InputStream gpxStream = convertKmlToGpxStream(is); + InputStream gpxStream = convertKmlToGpxStream(zis); if (gpxStream != null) { fileSize = gpxStream.available(); return GPXUtilities.loadGPXFile(gpxStream);