From ff521c611744bb69a3b49988d8cd6cd3c620225d Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Sat, 16 May 2020 13:48:37 -0300 Subject: [PATCH] Fix fallback for getting the current working directory This fixes a regression introduced in 40ba659f6d19001b964f72390153b81e33e1908a --- terminatorlib/cwd.py | 2 +- terminatorlib/terminal.py | 2 +- terminatorlib/terminator.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/terminatorlib/cwd.py b/terminatorlib/cwd.py index 58d3b5f2..d07d8c3f 100644 --- a/terminatorlib/cwd.py +++ b/terminatorlib/cwd.py @@ -28,7 +28,7 @@ def get_default_cwd(): return(cwd) def get_pid_cwd(): - """Determine an appropriate cwd function for the OS we are running on""" + """Determine the cwd of the current process""" return psutil.Process().as_dict()['cwd'] # vim: set expandtab ts=4 sw=4: diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 3bfad9e2..841214a3 100644 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -223,7 +223,7 @@ class Terminal(Gtk.VBox): return(GLib.filename_from_uri(vte_cwd)[0]) else: # Fall back to old gtk2 method - return(self.terminator.pid_cwd(self.pid)) + return(self.terminator.pid_cwd()) def close(self): """Close ourselves""" diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 81523dcf..681d724d 100644 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -99,7 +99,7 @@ class Terminator(Borg): if not self.doing_layout: self.doing_layout = False if not self.pid_cwd: - self.pid_cwd = get_pid_cwd() + self.pid_cwd = get_pid_cwd if self.gnome_client is None: self.attempt_gnome_client() self.connect_signals()