1
0
mirror of https://github.com/wting/autojump synced 2024-09-28 22:10:45 +00:00

Fix is_cwd for symlinks

Since `pwd` is a resolved symlink, the comparison in `is_cwd` needs to
use the real path, too.
This commit is contained in:
Daniel Hahler 2014-06-23 22:19:14 +02:00
parent 95472620c7
commit 196d5233a0

View File

@ -172,7 +172,7 @@ def find_matches(entries, needles, check_entries=True):
# using closure to prevent constantly hitting hdd # using closure to prevent constantly hitting hdd
def is_cwd(entry): def is_cwd(entry):
return entry.path == pwd return os.path.realpath(entry.path) == pwd
if check_entries: if check_entries:
path_exists = lambda entry: os.path.exists(entry.path) path_exists = lambda entry: os.path.exists(entry.path)