Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fallback for getting the current working directory #87

Merged
merged 1 commit into from
May 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion terminatorlib/cwd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
2 changes: 1 addition & 1 deletion terminatorlib/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def get_cwd(self):
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"""
Expand Down
2 changes: 1 addition & 1 deletion terminatorlib/terminator.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def prepare_attributes(self):
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()
Expand Down