Skip to content

Commit e761923

Browse files
committed
Merge branch 'master' into testing
* master: Make dirs if they don't exist fix var get
2 parents e6ca567 + 2080a81 commit e761923

File tree

1 file changed

+3
-0
lines changed
  • rplugin/python3/acid/commands

1 file changed

+3
-0
lines changed

rplugin/python3/acid/commands/new.py

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ def prepare_payload(self, ns):
2525
base = 'test' if ns.endswith('-test') else 'src'
2626
open_with = self.nvim.vars.get('acid_open_new_file_with', 'edit')
2727
path = os.path.join(current_path(self.nvim), base, fname)
28+
directory = os.path.dirname(path)
29+
if not os.path.exists(directory):
30+
os.makedirs(directory)
2831

2932
with open(path, 'w') as fpath:
3033
fpath.write('(ns {})'.format(ns))

0 commit comments

Comments
 (0)