GNOME Bugzilla – Bug 590760
extra CRs after save on windows
Last modified: 2010-06-27 21:41:54 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?
Created attachment 153974 [details] [review] save file in binary mode
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.
I've pushed this patch to HEAD. Thanks for the bug report and the patch.