From 20967f677a61b2412e94c42afc6511ac2762f7ca Mon Sep 17 00:00:00 2001 From: Scott Kuroda Date: Sat, 15 Mar 2014 14:08:03 -0700 Subject: [PATCH] Fix bug trying to open folder. --- advanced_new_file/commands/new_file_command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced_new_file/commands/new_file_command.py b/advanced_new_file/commands/new_file_command.py index 1ac4d8c..9a8cf4a 100644 --- a/advanced_new_file/commands/new_file_command.py +++ b/advanced_new_file/commands/new_file_command.py @@ -45,7 +45,7 @@ def single_file_action(self, path, apply_template=True): sublime.error_message("Cannot create '" + path + "'. See console for details") print("Exception: %s '%s'" % (e.strerror, e.filename)) - if attempt_open: + if attempt_open and os.path.isfile(path): file_view = self.open_file(path) if not file_exist and apply_template: file_view.settings().set("_anf_new", True)