This patch only appends the version regex if:
- the target doesn't start with "uuid:"
- the target starts with "uuid:", but has another colon later on
- the string after the colon consists of numbers
The matching was changed to match numbers starting after the colon, not
just somewhere after the column.
https://bugzilla.gnome.org/show_bug.cgi?id=664177
version = g_strrstr (pattern, ":");
if (version != NULL &&
- g_regex_match_simple (version_pattern, version + 1, 0, 0)) {
+ (g_strstr_len (pattern, -1, "uuid:") != pattern ||
+ version != g_strstr_len (pattern, -1, ":")) &&
+ g_regex_match_simple (version_pattern,
+ version + 1,
+ G_REGEX_MATCH_ANCHORED,
+ 0)) {
strcpy (version + 1, version_pattern);
}