After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 590760 - extra CRs after save on windows
extra CRs after save on windows
Status: RESOLVED FIXED
Product: meld
Classification: Other
Component: filediff
1.3.x
Other Windows
: Normal normal
: ---
Assigned To: Stephen Kennedy
Stephen Kennedy
Depends on:
Blocks:
 
 
Reported: 2009-08-04 17:44 UTC by alexander smishlajev
Modified: 2010-06-27 21:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
save file in binary mode (885 bytes, patch)
2010-02-16 22:37 UTC, Robert Wahler
none Details | Review

Description alexander smishlajev 2009-08-04 17:44:43 UTC
Please describe the problem:
when a file is saved on windows platform, line endings are changed from \r\n to \r\r\n.

Steps to reproduce:
1. open new file comparison
2. activate one of the file text windows
3. click the "save" button on the toolbar


Actual results:
extra CR character is added to all line endings in the saved file

Expected results:


Does this happen every time?


Other information:
it helps if i change file mode to "wb" for the output file in FileDiff._save_text_to_filename(), but wouldn't it be better to have line endings already normalized in the output text?
Comment 1 Robert Wahler 2010-02-16 22:37:13 UTC
Created attachment 153974 [details] [review]
save file in binary mode
Comment 2 Robert Wahler 2010-02-16 22:37:40 UTC
I confirmed both the issue and the fix proposed by Alexander.  I've attached a patch that applies cleanly to HEAD 50347304

I tested the patch on both Linux and Windows.
Comment 3 Kai Willadsen 2010-06-27 21:41:54 UTC
I've pushed this patch to HEAD. Thanks for the bug report and the patch.