FIX a fm segv - put a note as to why :)

SVN revision: 17861
This commit is contained in:
Carsten Haitzler 2005-10-24 01:17:01 +00:00
parent d90f4a5d1d
commit 11c6bde8d8
3 changed files with 22 additions and 8 deletions

4
TODO
View File

@ -30,8 +30,6 @@ Some of the things (in very short form) that need to be done to E17...
ESSENTIAL FEATURES
-------------------------------------------------------------------------------
* return from ipc if the command failed or not
* ipc should give more feedback wheter the options are accepted or not.
* emit signal to submenu entries if they have a submenu shown for them or not
* add fullscreen support (e16 xvidmode or xrandr style)
* implement thees maximise/fullscreen modes:
@ -109,6 +107,8 @@ Some of the things (in very short form) that need to be done to E17...
CLEANUPS
-------------------------------------------------------------------------------
* return from ipc if the command failed or not
* ipc should give more feedback wheter the options are accepted or not.
* find all other instances of using e_error dialogs and use them only with low
level errors than need attention no matter what.
* winlist should support place for window "screenshot" in list as well as

View File

@ -51,7 +51,13 @@ e_fm_file_new(const char *filename)
struct stat st;
if (stat(filename, &st) == -1) return NULL;
/* FIXME: stat above will fail if the file is a BROKEN SYMLINK - maybe we
* should not fail, but do an lstat here and see if it is a symlink (or
* just a race condition where the file was deleted as we scan), and
* if so mark it as a broken synlink. we should do an lstat ANYWAY
* so we know if a file is a symlink or not regardless what it points
* to.
*/
file = E_OBJECT_ALLOC(E_Fm_File, E_FM_FILE_TYPE, _e_fm_file_free);
if (!file) return NULL;
file->path = strdup(filename);

View File

@ -1391,6 +1391,7 @@ _e_fm_dir_files_get(E_Fm_Smart_Data *sd, int type)
while ((dir_entry = readdir(dir)) != NULL)
{
E_Fm_Icon *icon;
if ((!strcmp(dir_entry->d_name, ".") || (!strcmp (dir_entry->d_name, "..")))) continue;
if ((dir_entry->d_name[0] == '.') && (!(type & E_FM_FILE_TYPE_HIDDEN))) continue;
@ -1398,11 +1399,18 @@ _e_fm_dir_files_get(E_Fm_Smart_Data *sd, int type)
if (!icon) continue;
snprintf(path, sizeof(path), "%s/%s", sd->dir, dir_entry->d_name);
icon->file = e_fm_file_new(path);
icon->icon_object = e_fm_icon_add(sd->evas);
icon->sd = sd;
e_fm_icon_file_set(icon->icon_object, icon->file);
evas_object_resize(icon->icon_object, sd->icon_info.w, sd->icon_info.h);
files = evas_list_append(files, icon);
if (!icon->file)
{
E_FREE(icon);
}
else
{
icon->icon_object = e_fm_icon_add(sd->evas);
icon->sd = sd;
e_fm_icon_file_set(icon->icon_object, icon->file);
evas_object_resize(icon->icon_object, sd->icon_info.w, sd->icon_info.h);
files = evas_list_append(files, icon);
}
}
closedir(dir);