From 10e675a604672a6095b4c3548e6d021d0d1b314b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Mon, 29 Aug 2016 11:56:39 +0200 Subject: [PATCH] Fix infinte loop when using symlinks across mounts Closes #133 --- activate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activate.sh b/activate.sh index 817fd7a..b217c54 100755 --- a/activate.sh +++ b/activate.sh @@ -17,7 +17,7 @@ autoenv_init() { # We do this in a subshell so we can cd/chdir _files="` _hadone='' - while [ "${PWD}" != "${_mountpoint}" ]; do + while [ "$(pwd -P)" != "${_mountpoint}" ]; do _file="${PWD}/${AUTOENV_ENV_FILENAME}" if [ -f "${_file}" ]; then if [ -z "${_hadone}" ]; then