mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Garmin: Prevent infinite loop when fetching activity data
This commit is contained in:
+4
@@ -187,6 +187,10 @@ public CreateFileMessage initiateUpload(byte[] fileAsByteArray, FileType.FILETYP
|
||||
if (!FILE_TYPES_TO_PROCESS.contains(directoryEntry.filetype) && !fetchUnknownFiles) {
|
||||
continue;
|
||||
}
|
||||
if (fileIndex == 0 && fileDataType == 0 && fileSubType == 0 && fileNumber == 0 && specificFlags == 0 && fileFlags == 0 && fileSize == 0) {
|
||||
LOG.warn("Ignoring {} to avoid infinite loop", directoryEntry);
|
||||
continue;
|
||||
}
|
||||
LOG.debug("Queueing {} for download", directoryEntry);
|
||||
deviceSupport.addFileToDownloadList(directoryEntry);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user