Bug 391770

Summary: CSV importer ignores last line if not followed by a newline
Product: [Applications] kmymoney Reporter: Luca Weiss <bugzilla>
Component: importerAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.0.1
Sentry Crash Report:
Attachments: example csv without a trailing newline

Description Luca Weiss 2018-03-12 17:56:20 UTC
Created attachment 111345 [details]
example csv without a trailing newline

When the csv file to be imported doesn't have a trailing newline, it ignored the last line i.e. it doesn't get imported.
Attached is an example file.
Comment 1 Thomas Baumgart 2018-03-12 18:29:20 UTC
Git commit 632a4aa42a3c91e05ea14e0278de3dba31bcfd10 by Thomas Baumgart.
Committed on 12/03/2018 at 18:28.
Pushed by tbaumgart into branch '5.0'.

Deal with missing terminal newline in CSV importer

In case the last line of a CSV file does not contain a terminating
newline, the content of that line was discarded. This change takes care
of this situation and adds the line as if a newline was present.
FIXED-IN: 5.0.1

M  +6    -0    kmymoney/plugins/csv/import/core/csvutil.cpp

https://commits.kde.org/kmymoney/632a4aa42a3c91e05ea14e0278de3dba31bcfd10