I periodically submit an .adi file manually to LoTW. I create that file
from the wsjt_log.adi file, which I have marked with a blank line (a CR/LF)
to show the last place I have previously excerpted QSOs for submission.

The problem is that v2.0.0 GA now objects to that blank line at the end of
the wsjt_log.adi file at startup.

The patch is *very* simple: Detect end-of-file, stop processing, allowing
the last line(s) to be blank. See below.

73
Andy
K9AVT
Wyoming USA
---------------------------------------------------------------------
Author: k9avt <sf.20.avan...@xoxy.net>
Date:   Wed Dec 12 17:32:17 2018 -0700

    Allow last line(s) of .adi file to be blank

diff --git a/logbook/WorkedBefore.cpp b/logbook/WorkedBefore.cpp
index 160e1fa8..7bbaf146 100644
--- a/logbook/WorkedBefore.cpp
+++ b/logbook/WorkedBefore.cpp
@@ -320,6 +320,10 @@ namespace
                       }
                   }
                 while ((end_position = buffer.indexOf ("<EOR>", 0,
Qt::CaseInsensitive)) < 0 && !in.atEnd ());
+                if (in.atEnd ())    //avt 12/13/18 prevent "Invalid ADIF
record" case
+                  {
+                    break;
+                  }
                 if (end_position < 0)
                   {
                     throw LoaderException (std::runtime_error {"Invalid
ADIF record starting at: " + buffer.left (40).toStdString ()});
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to