* eet: reduce likeliness of race condition by checking file size too.

SVN revision: 50382
This commit is contained in:
Cedric BAIL 2010-07-20 16:13:51 +00:00
parent 58dfd1c2b8
commit 3f4ca260af
2 changed files with 6 additions and 1 deletions

View File

@ -405,3 +405,7 @@
(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.

View 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++;