Skip to content

Commit fdb9e5f

Browse files
Merge pull request #182 from bioimage-io/fix-add-weights
Normalize paths before comparison
2 parents 4f67ddd + fdfa8ff commit fdb9e5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bioimageio/core/build_spec/add_weights.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def add_weights(
4242
# copy the weight path to the input model's root, otherwise it will
4343
# not be found when packaging the new model
4444
weight_out = os.path.join(model.root_path, Path(weight_uri).name)
45-
if Path(weight_out) != Path(weight_uri):
45+
if Path(weight_out).absolute() != Path(weight_uri).absolute():
4646
copyfile(weight_uri, weight_out)
4747

4848
new_weights, tmp_arch = _get_weights(

0 commit comments

Comments
 (0)