Skip to content

Commit d48a8e1

Browse files
Fix /states page state file path for /ipfs/-prefixed CIDs
Use the _state_file_path helper so the /ipfs/ prefix is stripped before stat-ing the state file, fixing the 'Failed to get modification time' error.
1 parent 87bc473 commit d48a8e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎hivemind/app.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ async def states_page(request: Request):
290290
# Get file modification times and sort by most recent
291291
state_times = []
292292
for hivemind_id in mapping:
293-
state_file = STATES_DIR / f"{hivemind_id}.json"
293+
state_file = _state_file_path(hivemind_id)
294294
try:
295295
mtime = state_file.stat().st_mtime
296296
state_times.append((hivemind_id, mtime))

0 commit comments

Comments
 (0)