Skip to content

Commit

Permalink
Ignore the properties metadata file when reading annotations on Windo…
Browse files Browse the repository at this point in the history
…ws filesystems (#854)
  • Loading branch information
JBWilkie committed Jun 4, 2024
1 parent 225ba0a commit eafd182
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion darwin/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1471,7 +1471,7 @@ def get_annotation_files_from_dir(path: Path) -> Iterator[str]:
return (
str(filepath)
for filepath in sorted(path.glob("**/*.json"))
if "/.v7/" not in str(filepath)
if "/.v7/" not in str(filepath) and "\\.v7\\" not in str(filepath)
)


Expand Down
1 change: 1 addition & 0 deletions tests/darwin/exporter/formats/export_darwin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,4 @@ def test_properties_metadata_is_ignored_when_reading_annotations_directory():
annotation_filepaths = list(get_annotation_files_from_dir(Path(tmpdirname)))
for annotation_filepath in annotation_filepaths:
assert "./v7/" not in annotation_filepath
assert "\\.v7\\" not in annotation_filepath

0 comments on commit eafd182

Please sign in to comment.