Unix user_log_dir doesn't create log dir
qarkai opened this issue · 1 comments
qarkai commented
With opinion=True
(default) and ensure_exists=True
.
Minimal reproducible example:
from platformdirs import PlatformDirs
app_dirs = PlatformDirs("app", ensure_exists=True)
open(app_dirs.user_log_path / "app.log", "w")
Expected: ~/.local/state/app/log/app.log
is created.
Actual: only ~/.local/state/app
is created, got FileNotFoundError
.
No error with opinion=False
, file ~/.local/state/app/app.log
is created.
gaborbernat commented
PR welcome 👍