git-mr-comment-show: create revs dir if it doesn't exist
authorFrantisek Hrbata <frantisek@hrbata.com>
Sun, 20 Dec 2020 12:18:40 +0000 (13:18 +0100)
committerFrantisek Hrbata <frantisek@hrbata.com>
Sun, 20 Dec 2020 12:18:40 +0000 (13:18 +0100)
Signed-off-by: Frantisek Hrbata <frantisek@hrbata.com>
git-mr-comment-show

index 0463245481d2b40325c5dcfc7d09759e47c704f2..ce17dfc077fbf674a0e1b9737c74c7d1c2d1be44 100755 (executable)
@@ -77,6 +77,8 @@ if args.write_revs:
 else:
     revs_path = os.environ.get('HOME') + "/" + ".gimrr/comment.revs"
 
+os.makedirs(os.path.dirname(revs_path), exist_ok=True)
+
 fd = open(revs_path, "a+")
 fd.seek(0)
 fcntl.lockf(fd.fileno(), fcntl.LOCK_SH | fcntl.LOCK_NB)