when loading a .desktop file with fprev which is a link but NOT a link to removable media, set the link target as the new file to be previewed and update (fixes previews of .desktop files pointing to directories)

SVN revision: 77414
This commit is contained in:
Mike Blumenkrantz 2012-10-04 09:15:22 +00:00
parent 641e1f92fc
commit ae68c2d7a9
1 changed files with 16 additions and 0 deletions

View File

@ -519,6 +519,22 @@ _e_wid_fprev_preview_file(E_Widget_Data *wd)
eina_stringshare_del(file);
}
}
else if ((desktop) && (desktop->url) &&
(desktop->type == EFREET_DESKTOP_TYPE_LINK))
{
const char *url;
/* we don't know what the desktop points to here,
* so we'll just run recursively until we get a real file
*/
url = e_fm2_desktop_url_eval(desktop->url);
if (url)
{
eina_stringshare_del(wd->path);
wd->path = url;
_e_wid_fprev_preview_file(wd);
return;
}
}
if (desktop) efreet_desktop_free(desktop);
}
#ifdef HAVE_EMOTION