Skip to content

Commit f7c3dbd

Browse files
committed
fix: resolve directory creation logic in LoggingSettings to ensure parent directories are created
1 parent 3396d3a commit f7c3dbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chromatrace/logging_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(self, **data):
2121
if isinstance(self.file_path, str):
2222
self.file_path = Path(self.file_path)
2323
if isinstance(self.file_path, Path):
24-
self.file_path.mkdir(parents=True, exist_ok=True)
24+
self.file_path.parent.mkdir(parents=True, exist_ok=True)
2525

2626

2727
class ColoredFormatter(logging.Formatter):

0 commit comments

Comments
 (0)