Bug 377537

Summary: Complains to malformdness of patch file containing several trailing empty lines
Product: [Applications] kompare Reporter: Andrew Shark <ashark>
Component: parserAssignee: Kompare developers <kompare-devel>
Status: REPORTED ---    
Severity: minor CC: ashark
Priority: NOR    
Version: 4.1.22083   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: error while opening original
no error while opening modified file

Description Andrew Shark 2017-03-12 20:02:12 UTC
If a .patch file contains more than one empty lines at the end of file, Kompare complains that it has errors:

"The diff is malformed. Some lines could not be parsed and will not be displayed in the diff view."

I have created my patch file using rbt utility, not by myself. So I was surprised that kompare found some errors in it.
I have found out, that it is because additional trailing new line.

However, I am not familar with diff format specification. If it is really restricted, then it seems, that it is rbtool's bug.

Original file (generated by rbt) and modified one are attached.
Comment 1 Andrew Shark 2017-03-12 20:03:18 UTC
Created attachment 104527 [details]
error while opening original
Comment 2 Andrew Shark 2017-03-12 20:04:51 UTC
Created attachment 104528 [details]
no error while opening modified file
Comment 3 Justin Zobel 2022-11-03 01:39:53 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 4 Andrew Shark 2022-11-17 17:43:57 UTC
Yes, still reproducible. Kompare version is 4.1.22083