From 2def9292e06b2e29153843235ddd8889faea1be5 Mon Sep 17 00:00:00 2001 From: Dor Kleiman Date: Thu, 30 Apr 2020 00:18:41 +0300 Subject: [PATCH] Don't treat directories as files Powerline apparently blows up if you enter a directory which contains a directory named "powerline-shell.json". This fixes it. --- powerline_shell/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerline_shell/__init__.py b/powerline_shell/__init__.py index ae62704c..60f80519 100644 --- a/powerline_shell/__init__.py +++ b/powerline_shell/__init__.py @@ -149,7 +149,7 @@ def find_config(): os.path.join(os.environ.get("XDG_CONFIG_HOME", "~/.config"), "powerline-shell", "config.json"), ]: full = os.path.expanduser(location) - if os.path.exists(full): + if os.path.isfile(full): return full DEFAULT_CONFIG = {