Permissions fix

This commit is contained in:
7x11x13 2024-06-20 16:23:07 -04:00
parent 7134f4a2d2
commit 5cff160168
2 changed files with 3 additions and 3 deletions

View File

@ -1,3 +1,3 @@
# -*- encoding: utf-8 -*-
"""Python Soundcloud Music Downloader."""
__version__ = "v2.8.0"
__version__ = "v2.8.1"

View File

@ -170,7 +170,7 @@ def main():
config["scdl"]["client_id"] = client.client_id
# save client_id
config_file.parent.mkdir(parents=True, exist_ok=True)
config_lock = filelock.FileLock(default_config_file + ".scdl.lock", timeout=10)
config_lock = filelock.FileLock(str(config_file) + ".scdl.lock", timeout=10)
with config_lock:
with open(config_file, "w", encoding="UTF-8") as f:
config.write(f)
@ -289,7 +289,7 @@ def get_config(config_file: pathlib.Path) -> configparser.ConfigParser:
default_config_file = pathlib.Path(__file__).with_name("scdl.cfg")
config_lock = filelock.FileLock(str(default_config_file) + ".scdl.lock", timeout=10)
config_lock = filelock.FileLock(str(config_file) + ".scdl.lock", timeout=10)
with config_lock:
# load default config first