Garmin: Fix fetch stuck after unknown fit filetype

This commit is contained in:
José Rebelo
2025-09-03 23:16:23 +01:00
parent f23e98258c
commit 6d7cf6d3ae
2 changed files with 3 additions and 8 deletions
@@ -77,6 +77,7 @@ public class FileType {
FBT_BACKUP(128, 72),
SKIN_TEMP(128, 73),
FBT_PTD_BACKUP(128, 74),
UNKNOWN_79(128, 79), // sent by instinct 3
// Other files
DOWNLOAD_COURSE(255, 4),
@@ -1283,14 +1283,8 @@ public class GarminSupport extends AbstractBTLESingleDeviceSupport implements IC
try {
final FitImporter fitImporter = new FitImporter(getContext(), gbDevice);
fitImporter.importFile(file);
} catch (final FitParseException e) {
LOG.error("Inflated not fit file??", e);
if (currentlyDownloading != null && currentlyDownloading.getSyncFile() != null) {
currentlyDownloading = null;
}
return;
} catch (IOException e) {
LOG.error("Failed to read fit file", e);
} catch (final Exception e) {
LOG.error("Failed to parse file as fit", e);
if (currentlyDownloading != null && currentlyDownloading.getSyncFile() != null) {
currentlyDownloading = null;
}