Skip to content

Commit d2c922c

Browse files
committed
Create freeze destination directory if necessary
1 parent 1038970 commit d2c922c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tmuxp/cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@ def command_freeze(args):
388388

389389
dest = os.path.abspath(os.path.relpath(os.path.expanduser(dest)))
390390
if args.answer_yes or prompt_yes_no('Save to %s?' % dest):
391+
destdir = os.path.dirname(dest)
392+
if not os.path.isdir(destdir):
393+
os.makedirs(destdir)
391394
buf = open(dest, 'w')
392395
buf.write(newconfig)
393396
buf.close()

0 commit comments

Comments
 (0)