A patch for terminal inside gedit-plugin

Wei Keting weikting at gmail.com
Thu Jul 9 02:51:58 BST 2009


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 !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-motu/attachments/20090709/2be2ba78/attachment.htm 


More information about the Ubuntu-motu mailing list