From 5633ba200b6fb8c810ace6ef5f29595c87205c55 Mon Sep 17 00:00:00 2001 From: bricewge Date: Fri, 7 Jun 2019 11:20:17 +0200 Subject: [PATCH] swap order of checks to avoid potentially opening a remote connection (#46) fixes #45 --- direnv.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direnv.el b/direnv.el index c04dc3b..d5f3dc4 100644 --- a/direnv.el +++ b/direnv.el @@ -124,9 +124,9 @@ In these modes, direnv will use `default-directory' instead of (with-current-buffer (window-buffer) (let ((directory-name (direnv--directory))) (when (and directory-name - (file-directory-p directory-name) + (not (file-remote-p directory-name)) (not (string-equal direnv--active-directory directory-name)) - (not (file-remote-p directory-name))) + (file-directory-p directory-name)) (direnv-update-directory-environment directory-name))))) (defun direnv--summarise-changes (items)