[meld] newdifftab: Avoid expanduser for Windows unicode problems (bgo#756901)



commit cba4d99f355bb6200b54d17af834824c9d788076
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Nov 15 09:03:06 2015 +1000

    newdifftab: Avoid expanduser for Windows unicode problems (bgo#756901)
    
    On Windows, os.path.expanduser() breaks for unicode home directories.
    This patch attempts to work around this problem for the new comparsion
    tab by using the GLib equivalent when all we want is the home directory
    itself.

 meld/newdifftab.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/meld/newdifftab.py b/meld/newdifftab.py
index 978923b..c3bc6f3 100644
--- a/meld/newdifftab.py
+++ b/meld/newdifftab.py
@@ -15,6 +15,7 @@
 
 import os
 
+from gi.repository import GLib
 from gi.repository import GObject
 from gi.repository import Gtk
 
@@ -45,7 +46,7 @@ class NewDiffTab(GObject.GObject, gnomeglade.Component):
                              parentapp.append_vcview)
         self.diff_type = -1
 
-        default_path = os.path.expanduser("~")
+        default_path = GLib.get_home_dir()
         for chooser in self.file_chooser:
             chooser.set_current_folder(default_path)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]