0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

ircd:Ⓜ️:resource: Unstable is also a version (undocumented).

This commit is contained in:
Jason Volk 2022-07-29 17:35:58 -07:00
parent b2682d4e63
commit a2197e87df

View file

@ -144,7 +144,7 @@ ircd::m::resource::path_version(const string_view &path)
token(path, '/', 2, {})
};
const bool pass
const bool is_version
{
true
&& version.size() >= 2
@ -152,6 +152,13 @@ ircd::m::resource::path_version(const string_view &path)
&& (version[1] >= '0' && version[1] <= '9')
};
const bool pass
{
false
|| is_version
|| version == "unstable"
};
return pass? version: string_view{};
}