mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 09:33:06 +02:00
Only clean if parse error is out of <trk>
This commit is contained in:
+3
-2
@@ -126,11 +126,12 @@ abstract class AbstractFileTrackImporter extends DefaultHandler implements Track
|
||||
return trackIds.get(0);
|
||||
} catch (IOException | SAXException | ParserConfigurationException e) {
|
||||
Log.e(TAG, "Unable to import file", e);
|
||||
cleanImport();
|
||||
if (trackIds.size() > 0) {
|
||||
cleanImport();
|
||||
}
|
||||
throw new ImportParserException(e);
|
||||
} catch (SQLiteConstraintException e) {
|
||||
Log.e(TAG, "Unable to import file", e);
|
||||
cleanImport();
|
||||
throw new ImportAlreadyExistsException(e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user