forked from upstream-mirrors/OpenTracks
throw Exception when no doc.kml file found in kmz
This commit is contained in:
@@ -177,6 +177,10 @@ public class KmzTrackImporter implements TrackImporter {
|
|||||||
|
|
||||||
zipInputStream.closeEntry();
|
zipInputStream.closeEntry();
|
||||||
}
|
}
|
||||||
|
if (trackId == null) {
|
||||||
|
Log.d(TAG, "Unable to find doc.kml in kmz");
|
||||||
|
throw new RuntimeException(context.getString(R.string.import_no_kml_file_found));
|
||||||
|
}
|
||||||
return trackId;
|
return trackId;
|
||||||
} catch (ImportParserException | ImportAlreadyExistsException e) {
|
} catch (ImportParserException | ImportAlreadyExistsException e) {
|
||||||
Log.e(TAG, "Unable to import file", e);
|
Log.e(TAG, "Unable to import file", e);
|
||||||
|
|||||||
@@ -290,6 +290,7 @@ limitations under the License.
|
|||||||
<string name="import_unsupported_format">Unsupported file format</string>
|
<string name="import_unsupported_format">Unsupported file format</string>
|
||||||
<string name="import_parser_error">Parser error: %1$s</string>
|
<string name="import_parser_error">Parser error: %1$s</string>
|
||||||
<string name="import_unable_to_import_file">Unable to import file: %1$s</string>
|
<string name="import_unable_to_import_file">Unable to import file: %1$s</string>
|
||||||
|
<string name="import_no_kml_file_found">No doc.kml file found in KMZ</string>
|
||||||
<string name="import_error_info">%1$s: %2$s</string>
|
<string name="import_error_info">%1$s: %2$s</string>
|
||||||
<string name="import_error_list_dialog_title">Files not imported</string>
|
<string name="import_error_list_dialog_title">Files not imported</string>
|
||||||
<string name="import_file_imported">File %1$s imported</string>
|
<string name="import_file_imported">File %1$s imported</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user