Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
repo: Make locking precondition failures fatal
Use `g_error` and `g_assert*` rather than `g_return*` when checking the locking preconditions so that failures result in the program terminating. Since this code is protecting filesystem data, we'd rather crash than delete or corrupt data unexpectedly. `g_error` is used when the error is due to the caller requesting an invalid transition like attempting to pop a lock type that hasn't been taken. It also provides a semi-useful message about what happened. (cherry picked from commit 89f4ce2)
- Loading branch information