Skip to content

Commit

Permalink
Fix creation of missing directories (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
aplaice authored Sep 26, 2020
1 parent 186e8ad commit 0fc5719
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions brain_brew/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def find_all_files_in_directory(directory, recursive=False):

def create_path_if_not_exists(path):
dir_name = os.path.dirname(path)
if not Path().is_dir():
if not Path(dir_name).is_dir():
logging.warning(f"Creating missing filepath '{dir_name}'")
os.makedirs(os.path.dirname(dir_name), exist_ok=True)
os.makedirs(dir_name, exist_ok=True)


def split_tags(tags_value: str) -> list:
Expand Down

0 comments on commit 0fc5719

Please sign in to comment.