Commit 4c450f23 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

seek to the start of the file before calling lockf().

2004-09-28  Sven Neumann  <sven@gimp.org>

	* app/file/gimprecentlist.c: seek to the start of the file before
	calling lockf().
parent 39f06f45
2004-09-28 Sven Neumann <sven@gimp.org>
* app/file/gimprecentlist.c: seek to the start of the file before
calling lockf().
2004-09-28 Maurits Rijk <m.rijk@chello.nl>
* plug-ins/common/borderaverage.c: added size entry. Fixes #143156
......
......@@ -26,6 +26,7 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment