* eet: reduce likeliness of race condition by checking file size too.
authorcedric <cedric>
Tue, 20 Jul 2010 16:13:51 +0000 (16:13 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 20 Jul 2010 16:13:51 +0000 (16:13 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eet@50382 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/lib/eet_lib.c

index 735ee49..c80412a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        (less overhead). On other OS, pthread is still used by default.
        Pass --enable-win32-threads to activate thread support on
        Windows.
+
+2010-07-20  Cedric BAIL
+
+       * Improve file change detection in eet_open by checking size also.
index 601aa22..cd3e703 100644 (file)
@@ -1447,7 +1447,8 @@ eet_open(const char *file, Eet_File_Mode mode)
      }
 
    /* We found one */
-   if (ef && (file_stat.st_mtime != ef->mtime))
+   if (ef &&
+       ((file_stat.st_mtime != ef->mtime) || (file_stat.st_size != ef->data_size)))
      {
        ef->delete_me_now = 1;
        ef->references++;