diff --git a/hermes_constants.py b/hermes_constants.py index 21dda94ba5..96d8331244 100644 --- a/hermes_constants.py +++ b/hermes_constants.py @@ -223,6 +223,10 @@ def profile_name_for_home(path: str | Path | None) -> str | None: named = named_profile_home(candidate) if named is not None: return named.name + # A stored profile home is authoritative: its owner already resolved it, so the + # /profiles/ shape names the profile even when carries no markers. + if candidate.parent.name == "profiles" and not candidate.name.startswith("."): + return candidate.name except (OSError, RuntimeError, ValueError): return None return None