Fix kmz reading

This commit is contained in:
max-klaus 2021-02-03 16:10:46 +03:00
parent 47ee48f820
commit 457c90f945
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ class GpxOrFavouritesImportTask extends BaseLoadAsyncTask<Void, Void, GPXFile> {
ZipEntry entry; ZipEntry entry;
while ((entry = zis.getNextEntry()) != null) { while ((entry = zis.getNextEntry()) != null) {
if (entry.getName().endsWith(ImportHelper.KML_SUFFIX)) { if (entry.getName().endsWith(ImportHelper.KML_SUFFIX)) {
InputStream gpxStream = convertKmlToGpxStream(is); InputStream gpxStream = convertKmlToGpxStream(zis);
if (gpxStream != null) { if (gpxStream != null) {
fileSize = gpxStream.available(); fileSize = gpxStream.available();
return GPXUtilities.loadGPXFile(gpxStream); return GPXUtilities.loadGPXFile(gpxStream);

View file

@ -49,7 +49,7 @@ class KmzImportTask extends BaseLoadAsyncTask<Void, Void, GPXFile> {
ZipEntry entry; ZipEntry entry;
while ((entry = zis.getNextEntry()) != null) { while ((entry = zis.getNextEntry()) != null) {
if (entry.getName().endsWith(KML_SUFFIX)) { if (entry.getName().endsWith(KML_SUFFIX)) {
InputStream gpxStream = convertKmlToGpxStream(is); InputStream gpxStream = convertKmlToGpxStream(zis);
if (gpxStream != null) { if (gpxStream != null) {
fileSize = gpxStream.available(); fileSize = gpxStream.available();
return GPXUtilities.loadGPXFile(gpxStream); return GPXUtilities.loadGPXFile(gpxStream);