Skip to content

Commit

Permalink
fix: allow segmentation to overwrite existing segment properties (#26)
Browse files Browse the repository at this point in the history
If a new segmentation conversion was called, with a setting to overwrite
any existing output - this would fail if the existing output contained
segmentation properties. This is a small patch to fix that.
  • Loading branch information
seankmartin authored Nov 13, 2024
2 parents 10669d5 + 54c1b14 commit dc38b7d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def encode_segmentation(
if delete_existing and output_path.exists():
contents = list(output_path.iterdir())
content_names = {c.name for c in contents}
if content_names and content_names.difference({"data", "info", "mesh", "provenance"}):
if content_names and content_names.difference({"data", "info", "mesh", "provenance", "segment_properties"}):
raise FileExistsError(
f"Output directory {output_path!s} exists and contains non-conversion related files. {content_names}",
)
Expand Down

0 comments on commit dc38b7d

Please sign in to comment.