resolv symlinks

SVN revision: 17073
This commit is contained in:
sebastid 2005-09-29 17:25:38 +00:00 committed by sebastid
parent dbde72428c
commit f50cb7415e
1 changed files with 3 additions and 4 deletions

View File

@ -61,17 +61,16 @@ int
ecore_file_app_installed(const char *exe)
{
char *dir;
char buf[PATH_MAX];
char buf[PATH_MAX], buf2[PATH_MAX];
if (!exe) return 0;
if (ecore_file_can_exec(exe)) return 1;
if (realpath(exe, buf) && ecore_file_can_exec(buf)) return 1;
ecore_list_goto_first(__ecore_file_path_bin);
while ((dir = ecore_list_next(__ecore_file_path_bin)) != NULL)
{
snprintf(buf, sizeof(buf), "%s/%s", dir, exe);
if (ecore_file_can_exec(buf))
return 1;
if (realpath(buf, buf2) && ecore_file_can_exec(buf2)) return 1;
}
return 0;
}