fix relative path opening in efm... if link is relative it was broken.

This commit is contained in:
Carsten Haitzler 2013-02-24 12:57:59 +09:00
parent 90ecf25935
commit bedf4969a4
1 changed files with 16 additions and 1 deletions

View File

@ -528,7 +528,22 @@ _e_fm2_icon_path(const E_Fm2_Icon *ic, char *buf, int buflen)
int r;
if (ic->info.link)
r = snprintf(buf, buflen, "%s", ic->info.link);
{
if (ic->info.link[0] == '/')
r = snprintf(buf, buflen, "%s", ic->info.link);
else
{
char *tmp;
r = snprintf(buf, buflen, "%s/%s", ic->sd->path, ic->info.file);
tmp = ecore_file_realpath(buf);
if (tmp)
{
r = snprintf(buf, buflen, "%s", tmp);
free(tmp);
}
}
}
else
r = snprintf(buf, buflen, "%s/%s", ic->sd->path, ic->info.file);
return r < buflen;