terminator will cd to a non-existent directory upon split

Bug #208319 reported by Michael Shapiro
2
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
High
chantra
terminator (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: terminator

shell-init throws:

"shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory"
and the new terminator terminal starts in a non-existent directory

Reproduction steps:
1. Open a non-terminator terminal.
2. $ mkdir ng_lubs_dongs
3. $ cd ng_lubs_dongs
4. $ terminator
5 (in terminator). $ rm -rf ng_lubs_dongs
6. Right-click and split the terminator window, note that terminator cd's to ng_lubs_dongs still.

FIX IT NG. <3

Revision history for this message
Chris Jones (cmsj) wrote :

This is related to bug #181194. Not only do we need to be more sensible about where we get cwd from, we should also check before sending fork-command() that the requested cwd still exists and is a directory. Technically speaking that will produce a race condition, but the failure mode isn't dangerous AFAIK, and the chances of the directory disappearing in such a small window are pretty low.

Changed in terminator:
importance: Undecided → High
milestone: none → 1.0-beta
status: New → Triaged
Chris Jones (cmsj)
Changed in terminator:
status: New → Confirmed
Revision history for this message
chantra (chantra) wrote :

we could default to $HOME when the directory does not exist

self.cwd = cwd or os.getcwd();
if not os.path.exists(self.cwd) or not os.path.isdir(self.cwd):
  self.cwd = os.path.expanduser("~")

pushed rev 224 to trunk

Chris Jones (cmsj)
Changed in terminator:
assignee: nobody → chantra
status: Triaged → Fix Committed
Revision history for this message
chantra (chantra) wrote :

closing as fix is released since 0.8.1

Changed in terminator:
status: Confirmed → Fix Released
Chris Jones (cmsj)
Changed in terminator:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.