mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Warn if can't lock for any reason other than that the file is locked already.
And include the error string in the message.
This commit is contained in:
parent
9ed0174cb0
commit
a3871d9ca1
@ -652,14 +652,15 @@ GncXmlBackend::get_file_lock ()
|
|||||||
case EACCES:
|
case EACCES:
|
||||||
case EROFS:
|
case EROFS:
|
||||||
case ENOSPC:
|
case ENOSPC:
|
||||||
PWARN ("Unable to create the lockfile %s; may not have write priv",
|
|
||||||
m_lockfile.c_str());
|
|
||||||
be_err = ERR_BACKEND_READONLY;
|
be_err = ERR_BACKEND_READONLY;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
be_err = ERR_BACKEND_LOCKED;
|
be_err = ERR_BACKEND_LOCKED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (errno != EEXIST) // Can't lock, but not because the file is locked
|
||||||
|
PWARN ("Unable to create the lockfile %s: %s",
|
||||||
|
m_lockfile.c_str(), strerror(errno));
|
||||||
set_error(be_err);
|
set_error(be_err);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user