terminal for gedit don't cd to right directory ,I try to fix it !

--- terminal.py    2009-07-09 09:20:21.000000000 +0800
+++ terminal.py    2009-07-09 09:41:29.000000000 +0800
@@ -263,7 +263,9 @@
         if uri is not None and gedit.utils.uri_has_file_scheme(uri):
             gfile = gio.File(uri)
             directory = gfile.get_parent()
-            return os.path.dirname(directory.get_path())
+            dirpath = directory.get_path()
+            if os.path.isdir(dirpath) :
+                return dirpath
         return None

     def on_panel_populate_popup(self, panel, menu):


-- 
Hi,I am weiketing !
-- 
Ubuntu-motu mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu

Reply via email to