From 810258b66c46c73390e22681277b4d2bd3342863 Mon Sep 17 00:00:00 2001 From: CJ Date: Sat, 6 Aug 2011 11:00:23 -0500 Subject: [PATCH] fix: make sure the tags file is a file and not a directory --- ctagsplugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctagsplugin.py b/ctagsplugin.py index e2a2633..9d1e2bd 100644 --- a/ctagsplugin.py +++ b/ctagsplugin.py @@ -118,7 +118,7 @@ def wrapper(cb): if not f: return cb(window.active_view()) view = window.open_file( normpath(f), encoded_row_col ) def wrapped(): - if begin_edit: + if begin_edit: with edition(view): cb(view) else: cb(view) @@ -145,7 +145,7 @@ def find_tags_relative_to(view): while dirs: joined = normpath(os.path.sep.join(dirs + [f])) - if os.path.exists(joined): return joined + if os.path.exists(joined) and not os.path.isdir(joined): return joined else: dirs.pop() status_message("Can't find any relevant tags file")