Can you just use `g_str_has_suffix()` here?