Fix `is_cwd` for symlinks

Since `pwd` is a resolved symlink, the comparison in `is_cwd` needs to
use the real path, too.
pull/296/head
Daniel Hahler 10 years ago
parent 95472620c7
commit 196d5233a0

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

Loading…
Cancel
Save