[meld] Use binary mode to write text files (closes bgo#590760)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Use binary mode to write text files (closes bgo#590760)
- Date: Sun, 27 Jun 2010 21:41:17 +0000 (UTC)
commit 74a9e35678b78cf377ac01881b21d016c9e968c9
Author: Robert Wahler <robert gearheadforhire com>
Date: Tue Feb 16 13:24:01 2010 -0500
Use binary mode to write text files (closes bgo#590760)
_save_text_to_filename should use binary mode to keep line endings
on Windows.
meld/filediff.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 12c1d6f..3440975 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -979,7 +979,7 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
def _save_text_to_filename(self, filename, text):
try:
- open(filename, "w").write(text)
+ open(filename, "wb").write(text)
except IOError, e:
misc.run_dialog(
_("Error writing to %s\n\n%s.") % (filename, e),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]