Fix ecore_file_ls usage.

SVN revision: 17248
This commit is contained in:
sebastid 2005-10-06 19:38:46 +00:00 committed by sebastid
parent 7d5b20f5b2
commit d4a41079f7
2 changed files with 5 additions and 6 deletions

View File

@ -1006,9 +1006,7 @@ e_app_dir_file_list_get(E_App *a)
while ((file = ecore_list_next(files)))
{
if (file[0] != '.')
ecore_list_append(files2, file);
else
free(file);
ecore_list_append(files2, strdup(file));
}
ecore_list_destroy(files);
}

View File

@ -987,7 +987,7 @@ _temperature_cb_check(void *data)
}
#else
therms = ecore_file_ls("/proc/acpi/thermal_zone");
if (!therms || ecore_list_is_empty(therms))
if ((!therms) || ecore_list_is_empty(therms))
{
FILE *f;
@ -1001,6 +1001,7 @@ _temperature_cb_check(void *data)
}
else
{
if (therms) ecore_list_destroy(therms);
therms = ecore_file_ls("/sys/bus/i2c/devices");
if ((therms) && (!ecore_list_is_empty(therms)))
{
@ -1034,6 +1035,7 @@ _temperature_cb_check(void *data)
}
}
}
ecore_list_destroy(therms);
}
}
}
@ -1056,10 +1058,9 @@ _temperature_cb_check(void *data)
ret = 1;
fclose(f);
}
free(name);
}
ecore_list_destroy(therms);
}
if (therms) ecore_list_destroy(therms);
#endif
if (ef->conf->units == FAHRENHEIT)