mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-30 12:44:01 -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 EROFS:
|
||||
case ENOSPC:
|
||||
PWARN ("Unable to create the lockfile %s; may not have write priv",
|
||||
m_lockfile.c_str());
|
||||
be_err = ERR_BACKEND_READONLY;
|
||||
break;
|
||||
default:
|
||||
be_err = ERR_BACKEND_LOCKED;
|
||||
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);
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user