2009-06-25 Rafael Avila de Espindola <espindola@google.com>
* plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type field of struct dirent.
This commit is contained in:
parent
15f0844bac
commit
c41ba836f2
@ -1,3 +1,8 @@
|
|||||||
|
2009-06-25 Rafael Avila de Espindola <espindola@google.com>
|
||||||
|
|
||||||
|
* plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
|
||||||
|
field of struct dirent.
|
||||||
|
|
||||||
2009-06-23 Tristan Gingold <gingold@adacore.com>
|
2009-06-23 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
* vms.c (vms_get_synthetic_symtab): Remove duplicate definition
|
* vms.c (vms_get_synthetic_symtab): Remove duplicate definition
|
||||||
|
@ -203,11 +203,11 @@ load_plugin (void)
|
|||||||
while ((ent = readdir (d)))
|
while ((ent = readdir (d)))
|
||||||
{
|
{
|
||||||
char *full_name;
|
char *full_name;
|
||||||
if (ent->d_type != DT_REG && ent->d_type != DT_LNK)
|
struct stat s;
|
||||||
continue;
|
|
||||||
|
|
||||||
full_name = concat (p, "/", ent->d_name, NULL);
|
full_name = concat (p, "/", ent->d_name, NULL);
|
||||||
found = try_load_plugin (full_name);
|
if (stat(full_name, &s) == 0 && S_ISREG (s.st_mode))
|
||||||
|
found = try_load_plugin (full_name);
|
||||||
free (full_name);
|
free (full_name);
|
||||||
if (found)
|
if (found)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user