Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_file Modified Files: ecore_file_monitor_inotify.c Log Message: - if the file doesn't exist or the monitor add fails then we will delete the item from the list, but if the item isn't in the list the resultant list ends up being NULL and we lose everything being monitored so far. So, add the item to the list earlier so we can remove it safely if needed. =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- ecore_file_monitor_inotify.c 3 Jul 2007 18:18:12 -0000 1.20 +++ ecore_file_monitor_inotify.c 3 Jul 2007 19:37:18 -0000 1.21 @@ -114,6 +114,8 @@ if (em->path[len - 1] == '/' && strcmp(em->path, "/")) em->path[len - 1] = 0; + _monitors = _ecore_list2_append(_monitors, em); + if (ecore_file_exists(em->path)) { if (!_ecore_file_monitor_inotify_monitor(em, em->path)) @@ -128,8 +130,6 @@ ecore_file_monitor_inotify_del(em); return NULL; } - - _monitors = _ecore_list2_append(_monitors, em); return em; } ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs