prevent efm popups from being created for files/directories the user cannot read

ticket #1471


SVN revision: 76383
This commit is contained in:
Mike Blumenkrantz 2012-09-10 09:08:24 +00:00
parent c15989c37f
commit 01ecf27697
1 changed files with 2 additions and 1 deletions

View File

@ -622,6 +622,8 @@ _e_fwin_icon_popup(void *data)
fwin->popup_timer = NULL;
if (!fwin->popup_icon) return EINA_FALSE;
snprintf(buf, sizeof(buf), "%s/%s", e_fm2_real_path_get(fwin->cur_page->fm_obj), fwin->popup_icon->file);
if (!ecore_file_can_read(buf)) return EINA_FALSE;
if (fwin->popup) e_object_del(E_OBJECT(fwin->popup));
zone = fwin->zone ?: fwin->win->border->zone;
e_fm2_icon_geometry_get(fwin->popup_icon->ic, &x, &y, &w, &h);
@ -665,7 +667,6 @@ _e_fwin_icon_popup(void *data)
*/
list = e_widget_framelist_add(fwin->popup->evas, fwin->popup_icon->file, 0);
o = e_widget_filepreview_add(fwin->popup->evas, mw, mh, 0);
snprintf(buf, sizeof(buf), "%s/%s", e_fm2_real_path_get(fwin->cur_page->fm_obj), fwin->popup_icon->file);
e_widget_filepreview_path_set(o, buf, fwin->popup_icon->mime);
e_widget_framelist_object_append(list, o);
e_widget_size_min_get(list, &mw, &mh);