From c4c9dd335d8fd7600df7674445d2ec068668ee07 Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Mon, 8 Aug 2022 10:26:31 +0800 Subject: [PATCH] standarlize the config path --- tools/post-log.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/post-log.py b/tools/post-log.py index f303472..82093a9 100755 --- a/tools/post-log.py +++ b/tools/post-log.py @@ -14,14 +14,14 @@ def get_uuid_raw() -> str: possible_uuid_files = [ "/var/lib/dbus/machine-id", "/etc/machine-id", - os.path.join(os.path.expanduser('~'), ".config/uuid"), + os.path.join(os.path.expanduser('~'), ".config/dotfiles/uuid"), ] for i in possible_uuid_files: if os.path.exists(i): with open(i, "r") as f: return f.read().strip() if not os.path.exists(os.path.dirname(possible_uuid_files[-1])): - os.mkdir(os.path.dirname(possible_uuid_files[-1])) + os.makedirs(os.path.dirname(possible_uuid_files[-1])) with open(possible_uuid_files[-1], 'w') as f: ans = str(uuid.uuid4()) f.write(ans)