fix buildbot reported problems (unix related), part 3, don't use GError with GLib 1.x
svn path=/trunk/; revision=14239
This commit is contained in:
parent
6380ee9999
commit
64fc9ea002
@ -110,7 +110,7 @@ fileset_filename_match_pattern(const char *fname)
|
|||||||
while(minlen--) {
|
while(minlen--) {
|
||||||
baselen--;
|
baselen--;
|
||||||
|
|
||||||
if(!isdigit(filename[baselen])) {
|
if(!isdigit( (int) filename[baselen])) {
|
||||||
g_free(filename);
|
g_free(filename);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -255,9 +255,6 @@ fileset_add_dir(const char *fname)
|
|||||||
|
|
||||||
dirname = g_string_append_c(dirname, G_DIR_SEPARATOR);
|
dirname = g_string_append_c(dirname, G_DIR_SEPARATOR);
|
||||||
|
|
||||||
dummy = g_malloc(sizeof(GError *));
|
|
||||||
*dummy = NULL;
|
|
||||||
|
|
||||||
/* if the current file can't be part of any fileset, do nothing */
|
/* if the current file can't be part of any fileset, do nothing */
|
||||||
if(!fileset_filename_match_pattern(fname)) {
|
if(!fileset_filename_match_pattern(fname)) {
|
||||||
entry = fileset_add_file(dirname->str, get_basename(fname), TRUE /* current */);
|
entry = fileset_add_file(dirname->str, get_basename(fname), TRUE /* current */);
|
||||||
@ -272,6 +269,9 @@ fileset_add_dir(const char *fname)
|
|||||||
while ((file = readdir(dir)) != NULL) {
|
while ((file = readdir(dir)) != NULL) {
|
||||||
name = (gchar *)file->d_name;
|
name = (gchar *)file->d_name;
|
||||||
#else
|
#else
|
||||||
|
dummy = g_malloc(sizeof(GError *));
|
||||||
|
*dummy = NULL;
|
||||||
|
|
||||||
if ((dir = g_dir_open(dirname->str, 0, dummy)) != NULL) {
|
if ((dir = g_dir_open(dirname->str, 0, dummy)) != NULL) {
|
||||||
while ((name = g_dir_read_name(dir)) != NULL) {
|
while ((name = g_dir_read_name(dir)) != NULL) {
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user