Once again spotted by mobmix
Also add a changes file for the fix
--- /dev/null
+ o Minor bugfixes:
+ - Fix a bug with our locking implementation on windows that couldn't
+ correctly detect when a file was already locked. Fixes bug 2504,
+ bugfix on 0.2.1.6-alpha.
+
#ifdef WIN32
_lseek(fd, 0, SEEK_SET);
if (_locking(fd, blocking ? _LK_LOCK : _LK_NBLCK, 1) < 0) {
- if (errno != EACCESS && errno != EDEADLOCK)
+ if (errno != EACCES && errno != EDEADLOCK)
log_warn(LD_FS,"Couldn't lock \"%s\": %s", filename, strerror(errno));
else
*locked_out = 1;