From 6208adec3f893fce1f25a90ee9b52d3f0e3c32e0 Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Sun, 7 Aug 2022 15:05:04 +0800 Subject: [PATCH] bug fix --- tools/post-log.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/post-log.py b/tools/post-log.py index 35a161a..f303472 100755 --- a/tools/post-log.py +++ b/tools/post-log.py @@ -20,7 +20,8 @@ def get_uuid_raw() -> str: if os.path.exists(i): with open(i, "r") as f: return f.read().strip() - os.mkdir(os.path.dirname(possible_uuid_files[-1])) + if not os.path.exists(os.path.dirname(possible_uuid_files[-1])): + os.mkdir(os.path.dirname(possible_uuid_files[-1])) with open(possible_uuid_files[-1], 'w') as f: ans = str(uuid.uuid4()) f.write(ans)