Skip to content

Commit c09445c

Browse files
committed
Another fix for not starting path with /
1 parent 4c59c2e commit c09445c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/murfey/client/contexts/spa_metadata.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,16 @@ def post_transfer(
163163
atlas=Path(partial_path), sample=sample
164164
)
165165
url = f"{str(environment.url.geturl())}/visits/{environment.visit}/{environment.murfey_session}/register_data_collection_group"
166-
dcg_search_dir = "/" + "/".join(
166+
dcg_search_dir = "/".join(
167167
p
168-
for p in transferred_file.parent.parts[1:]
168+
for p in transferred_file.parent.parent.parts
169169
if p != environment.visit
170170
)
171+
dcg_search_dir = (
172+
dcg_search_dir[1:]
173+
if dcg_search_dir.startswith("//")
174+
else dcg_search_dir
175+
)
171176
dcg_images_dirs = sorted(
172177
Path(dcg_search_dir).glob("Images-Disc*"),
173178
key=lambda x: x.stat().st_ctime,

0 commit comments

Comments
 (0)