diff --git a/ChangeLog b/ChangeLog index 72708608ca..ff981c05d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-09-28 Sven Neumann + + * app/file/gimprecentlist.c: seek to the start of the file before + calling lockf(). + 2004-09-28 Maurits Rijk * plug-ins/common/borderaverage.c: added size entry. Fixes #143156 diff --git a/app/file/gimprecentlist.c b/app/file/gimprecentlist.c index 4d9a3281b1..6cecf3c577 100644 --- a/app/file/gimprecentlist.c +++ b/app/file/gimprecentlist.c @@ -26,6 +26,7 @@ #include "config.h" +#include #include #include #include @@ -489,6 +490,8 @@ gimp_recent_list_lock_file (gint fd) * changes. */ + lseek (fd, 0, SEEK_SET); + for (i = 0; i < 5; i++) { gint rand_interval; @@ -507,6 +510,8 @@ gimp_recent_list_lock_file (gint fd) static gboolean gimp_recent_list_unlock_file (gint fd) { + lseek (fd, 0, SEEK_SET); + return (lockf (fd, F_ULOCK, 0) == 0) ? TRUE : FALSE; }