From: Frantisek Hrbata Date: Sun, 20 Dec 2020 12:18:40 +0000 (+0100) Subject: git-mr-comment-show: create revs dir if it doesn't exist X-Git-Tag: v0.2~13 X-Git-Url: http://www.hrbata.com/gitweb/?a=commitdiff_plain;h=73de054d01a809199a4773da51216f86f551e7b5;p=gimrr.git git-mr-comment-show: create revs dir if it doesn't exist Signed-off-by: Frantisek Hrbata --- diff --git a/git-mr-comment-show b/git-mr-comment-show index 0463245..ce17dfc 100755 --- a/git-mr-comment-show +++ b/git-mr-comment-show @@ -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)