After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 579448 - Embedded terminal changes to wrong directory
Embedded terminal changes to wrong directory
Status: RESOLVED FIXED
Product: gedit-plugins
Classification: Other
Component: General
2.26.x
Other All
: Normal minor
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2009-04-18 20:45 UTC by Mickaël Delahaye
Modified: 2019-03-23 20:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
A patch to terminal.py (567 bytes, patch)
2009-04-18 20:46 UTC, Mickaël Delahaye
none Details | Review
Git-formated patch against the latest head of the gedit-plugins git repository (1.06 KB, patch)
2009-04-19 22:44 UTC, Mickaël Delahaye
committed Details | Review

Description Mickaël Delahaye 2009-04-18 20:45:38 UTC
Please describe the problem:
The command Change directory of the embedded terminal actually changes the working directory to the parent of the parent directory of the current file instead of the current directory. 

Steps to reproduce:
1. Open a file, say "a/b/c.txt"
2. Click Change directory in the popup menu in the embedded directory

Actual results:
The current directory is now "a/"

Expected results:
I expected "a/b/"

Does this happen every time?
yes

Other information:
Comment 1 Mickaël Delahaye 2009-04-18 20:46:50 UTC
Created attachment 132877 [details] [review]
A patch to terminal.py

A patch which solves the problem on Ubuntu Jaunty
Comment 2 Paolo Borelli 2009-04-18 20:54:07 UTC
+            from sys import stderr

Why did you add this?


Apart from that, if you are creating the patch against the brand new git repository, can you create it with the "git format-patch" including a good changelog?


Thanks!
Comment 3 jessevdk@gmail.com 2009-04-18 23:53:25 UTC
Also, bad nacho!
Comment 4 Ignacio Casal Quinteiro (nacho) 2009-04-19 00:24:14 UTC
(In reply to comment #3)
> Also, bad nacho!
> 

mmmm, right sorry about this.
Comment 5 Mickaël Delahaye 2009-04-19 22:17:52 UTC
Comment on attachment 132877 [details] [review]
A patch to terminal.py

--- /usr/lib/gedit-2/plugins/terminal.py.bak	2009-04-18 20:47:04.942139897 +0200
+++ /usr/lib/gedit-2/plugins/terminal.py	2009-04-20 00:16:32.946158956 +0200
@@ -263,7 +263,7 @@
         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())
+            return directory.get_path()
         return None
 
     def on_panel_populate_popup(self, panel, menu):
Comment 6 Mickaël Delahaye 2009-04-19 22:24:48 UTC
(In reply to comment #2)
> +            from sys import stderr
> 
> Why did you add this?
> 
> 
> Apart from that, if you are creating the patch against the brand new git
> repository, can you create it with the "git format-patch" including a good
> changelog?
> 
> 
> Thanks!
> 

My bad... I let this one line slip through.
I do not actually know where this repository is... I searched on the gnome live gedit page and the gedit site. If you give me the address, it will be my pleasure.
Comment 7 Mickaël Delahaye 2009-04-19 22:44:57 UTC
Created attachment 132929 [details] [review]
Git-formated patch against the latest head of the gedit-plugins git repository

I did find the git repository...
Comment 8 jessevdk@gmail.com 2009-04-20 05:55:30 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.