Bug 383418

Summary: Saving diff produces empty file
Product: [Applications] kompare Reporter: Mattia <mattia.verga>
Component: generalAssignee: Kompare developers <kompare-devel>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 4.1.22082   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: screenshot of diff settings

Description Mattia 2017-08-12 09:32:05 UTC
If I compare two text files I can see the differences in the browser, but when I choose to save the comparison to a file, Kompare produces void file (zero byte).
No error is showed.
Comment 1 Kevin Kofler 2018-02-06 14:04:18 UTC
I cannot reproduce this. I tried comparing 2 files, then using "Save diff...". It made me select the diff settings. I clicked "Save", picked a file name, then clicked "Save" again. I got a valid diff file.

So I will need more precise reproducing instructions.
Comment 2 Mattia 2018-02-06 16:35:39 UTC
Created attachment 110370 [details]
screenshot of diff settings

I made the exact same steps (see screenshot), but when I save the diff file I get a 0 byte file:

$ ls -l conf.diff 
-rw-------. 1 marvin marvin 0  6 feb 17.28 conf.diff

I get the same result in a freshly installed Fedora Rawhide virtual machine. I already tried to load default kompare settings, but nothing change.
Comment 3 Kevin Kofler 2018-02-06 17:31:56 UTC
This is weird. I even get the exact same diff options, yet, for me, it runs diff just fine. I'm running Fedora 27, with the Kompare from the Fedora RPM package (which you are also using, aren't you?).
Comment 4 Kevin Kofler 2018-02-06 17:33:01 UTC
What happens when you run the same command:
diff -U 3 -dHrN -- one.txt two.txt >conf.diff
in a Konsole?
Comment 5 Mattia 2018-02-08 18:50:15 UTC
Yes, I'm using the F27 RPMs (and Rawhide RPMs on the Virtual machine).

Running the command from console correctly produces the diff file.
Comment 6 Christoph Feck 2018-02-22 23:54:41 UTC
Thanks for the update; changing status.
Comment 7 Justin Zobel 2022-11-15 22:58:22 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 8 Mattia 2022-11-16 18:29:16 UTC
Hello, yes I can still reproduce in 4.1.22082

Comparing two simple text files in user home directory, UI shows differences, choosing "File -> save comparison" (roughly translated from Italian) if I fill "run comparison in" field (with the same user home directory or another parent dir), the produced output file is empty. The output is fine if I leave that field empty.