core: make getcwd() fail-safe
commita6d59cc1bfa0dea035e6df599a0a618a153319f2
authorDavid Aguilar <davvid@gmail.com>
Wed, 3 Jul 2019 18:07:59 +0000 (3 11:07 -0700)
committerDavid Aguilar <davvid@gmail.com>
Wed, 3 Jul 2019 18:10:43 +0000 (3 11:10 -0700)
tree00aa4ccb165361c207d66d2382100b1f12f8237d
parent761a02cf0dee0d17392cd2c2fd4b02fce9e179d0
core: make getcwd() fail-safe

On Linux and other unix-like operating systems it's possible to launch
cola from a directory that has since been deleted.  Make getcwd() robust
to this situation by walking up the directory tree.

Closes #961
Reported-by: Ivar Smolin (ookull) <okul@linux.ee>
Signed-off-by: David Aguilar <davvid@gmail.com>
cola/core.py
share/doc/git-cola/relnotes.rst