1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-18 19:52:09 +01:00

Added workaround for broken IGC files created by XCSoar

closes #371
This commit is contained in:
Martin Tůma 2021-05-14 22:47:09 +02:00
parent 38d6f52965
commit f3c0ed3f7f

View File

@ -240,8 +240,11 @@ bool IGCParser::parse(QFile *file, QList<TrackData> &tracks,
}
} else if (line[0] == 'B') {
if (ctx.date.isNull()) {
_errorString = "Missing date header";
return false;
/* The date H header is mandatory, but XCSOAR generates
files without it, so add a dummy date in such case */
qWarning("%s: Missing date header",
qPrintable(file->fileName()));
ctx.date = QDate(1970, 1, 1);
}
if (!track) {
tracks.append(TrackData());