Skip to content

Commit 77e75af

Browse files
committed
Merge pull request #72 from ThiefMaster/patch-1
Create freeze destination directory if necessary
2 parents c5e19fa + d2c922c commit 77e75af

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)