Skip to content

Commit

Permalink
bug fix: should check for is_dir not exists
Browse files Browse the repository at this point in the history
Otherwise, if given a dir - will treat like a single file.
  • Loading branch information
e-lo committed Oct 7, 2024
1 parent 68e902a commit dfb08bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projectcard/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def read_cards(
cards = {}

filepath = _resolve_rel_paths(filepath, base_path=base_path)
if isinstance(filepath, list) or not filepath.exists():
if isinstance(filepath, list) or filepath.is_dir():
card_paths = _get_cardpath_list(filepath, valid_ext=VALID_EXT, recursive=recursive)
for p in card_paths:
project_card = _read_card(
Expand Down

0 comments on commit dfb08bb

Please sign in to comment.