summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2011-03-01 09:57:13 +0000
committerCedric BAIL <cedric.bail@free.fr>2011-03-01 09:57:13 +0000
commitfd6268a991c36f37e45a9ff3bf593b15b4d47fc5 (patch)
tree5e6f0aab2e97626fb5c3ef4fb1329758b89f9805
parent40edc9ccb1aacb3a13873bfde0657156b3866983 (diff)
ecore: fix detection of complete file write in ecore_file inotify.
Patch by Guillaume Friloux <uillaume.friloux@asp64.com>. SVN revision: 57450
-rw-r--r--legacy/ecore/ChangeLog5
-rw-r--r--legacy/ecore/src/lib/ecore_file/Ecore_File.h3
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/legacy/ecore/ChangeLog b/legacy/ecore/ChangeLog
index e60f70972c..dfbf4be330 100644
--- a/legacy/ecore/ChangeLog
+++ b/legacy/ecore/ChangeLog
@@ -76,3 +76,8 @@
762011-03-01 Raoul Hecky 762011-03-01 Raoul Hecky
77 77
78 * Add ecore_con_url_ssl_verify_peer_set API. 78 * Add ecore_con_url_ssl_verify_peer_set API.
79
802011-03-01 Guillaume Friloux
81
82 * Fix detection of complete file write in ecore_file inotify.
83
diff --git a/legacy/ecore/src/lib/ecore_file/Ecore_File.h b/legacy/ecore/src/lib/ecore_file/Ecore_File.h
index e734d5e5a3..e4b8851992 100644
--- a/legacy/ecore/src/lib/ecore_file/Ecore_File.h
+++ b/legacy/ecore/src/lib/ecore_file/Ecore_File.h
@@ -73,7 +73,8 @@ typedef enum _Ecore_File_Event
73 ECORE_FILE_EVENT_DELETED_FILE, /**< Deleted file event. */ 73 ECORE_FILE_EVENT_DELETED_FILE, /**< Deleted file event. */
74 ECORE_FILE_EVENT_DELETED_DIRECTORY, /**< Deleted directory event. */ 74 ECORE_FILE_EVENT_DELETED_DIRECTORY, /**< Deleted directory event. */
75 ECORE_FILE_EVENT_DELETED_SELF, /**< Deleted monitored directory event. */ 75 ECORE_FILE_EVENT_DELETED_SELF, /**< Deleted monitored directory event. */
76 ECORE_FILE_EVENT_MODIFIED /**< Modified file or directory event. */ 76 ECORE_FILE_EVENT_MODIFIED, /**< Modified file or directory event. */
77 ECORE_FILE_EVENT_CLOSED /**< Closed file event */
77} Ecore_File_Event; 78} Ecore_File_Event;
78 79
79/** 80/**
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c b/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c
index 0491f294c8..255ca1b382 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c
@@ -218,7 +218,7 @@ _ecore_file_monitor_inotify_events(Ecore_File_Monitor *em, char *file, int mask)
218 if (mask & IN_CLOSE_WRITE) 218 if (mask & IN_CLOSE_WRITE)
219 { 219 {
220 if (!isdir) 220 if (!isdir)
221 em->func(em->data, em, ECORE_FILE_EVENT_MODIFIED, buf); 221 em->func(em->data, em, ECORE_FILE_EVENT_CLOSED, buf);
222 } 222 }
223 if (mask & IN_MODIFY) 223 if (mask & IN_MODIFY)
224 { 224 {