Skip to content

Commit c5721d5

Browse files
committed
Added an additional check to see if the glob match is an actual directory
1 parent 0158ee6 commit c5721d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/murfey/server/api/session_shared.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ def find_upstream_visits(session_id: int, db: SQLModelSession):
168168
# Looks for visit name in file path
169169
current_upstream_visits = {}
170170
for visit_path in Path(upstream_data_dir).glob(f"{visit_name.split('-')[0]}-*"):
171-
current_upstream_visits[visit_path.name] = visit_path
171+
if visit_path.is_dir():
172+
current_upstream_visits[visit_path.name] = visit_path
172173
upstream_visits[upstream_instrument] = current_upstream_visits
173174
return upstream_visits
174175

0 commit comments

Comments
 (0)