From c533b2b4fd86aa1fc29e75e1470eea3ea57c43f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Schaerer?= Date: Tue, 26 Jan 2010 16:47:13 +0100 Subject: [PATCH] weird corner cases --- autojump | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autojump b/autojump index bcb617c..e647a2c 100755 --- a/autojump +++ b/autojump @@ -37,7 +37,10 @@ def dicadd(dic,key,increment=1): def match(path,pattern,path_dict,re_flags=0): import re - if os.path.realpath(os.curdir)==path : return False + try: + if os.path.realpath(os.curdir)==path : return False + except OSError: #sometimes the current path doesn't exist anymore. In that case, jump if possible. + pass if re.search(pattern,"/".join(path.split('/')[-1-pattern.count('/'):]),re_flags) is None: return False else: