Skip to content

Commit 94ab227

Browse files
committed
Yet another not starting from root properly fix
1 parent c09445c commit 94ab227

File tree

1 file changed

+8
-5
lines changed
  • src/murfey/client/contexts

1 file changed

+8
-5
lines changed

src/murfey/client/contexts/spa.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -474,12 +474,15 @@ def _position_analysis(
474474
foil_hole,
475475
grid_square,
476476
)
477+
metadata_source_as_str = (
478+
"/".join(source.parts[:-2])
479+
+ f"/{environment.visit}/"
480+
+ source.parts[-2]
481+
)
477482
metadata_source = Path(
478-
(
479-
"/".join(source.parts[:-2])
480-
+ f"/{environment.visit}/"
481-
+ source.parts[-2]
482-
)[1:]
483+
metadata_source_as_str[1:]
484+
if metadata_source_as_str.startswith("//")
485+
else metadata_source_as_str
483486
)
484487
image_path = (
485488
_file_transferred_to(environment, metadata_source, Path(fh.image))

0 commit comments

Comments
 (0)