Commit c4e656c6 c4e656c6b527f269f7665ffe7fa65a94c2c55be8 by Sergey Poznyakoff

(locker_lock): Allow for non-absolute file names.

1 parent eea4f28c
......@@ -425,8 +425,14 @@ locker_lock (locker_t lock)
strcpy (tmp, lock->file);
p = strrchr (tmp, '/');
/* A '/' must be present, if not we'll coredump, and that's
correct! */
if (!p)
{
free (tmp);
tmp = strdup (".");
if (!tmp)
return ENOMEM;
}
else
*p = 0;
if (access (tmp, W_OK))
......