g_assert (kind == ADDONS_USER_SCRIPTS || kind == ADDONS_USER_STYLES);
if (kind == ADDONS_USER_SCRIPTS)
- file_extension = g_strdup (".js");
+ file_extension = ".js";
else if (kind == ADDONS_USER_STYLES)
- file_extension = g_strdup (".css");
+ file_extension = ".css";
+ else
+ g_assert_not_reached ();
files = NULL;
directories = g_slist_next (directories);
}
- g_free (file_extension);
g_slist_free (directories);
return files;
rest_of_line = g_strdup (line);
rest_of_line = g_strstrip (rest_of_line);
+ line_has_meta = g_str_has_suffix (rest_of_line, "{") ? FALSE : TRUE;
+
parts = g_strsplit (rest_of_line, " ", 0);
i = 0;
while (parts[i] && (*parts[i] != '\0' && *parts[i] != '{'))
i++;
}
g_strfreev (parts);
+ g_free (rest_of_line);
}
- line_has_meta = g_str_has_suffix (rest_of_line, "{") ? FALSE : TRUE;
+ else
+ line_has_meta = FALSE;
}
g_free (line);
}