Name the directory whose lock we're waiting on (#700)

This commit is contained in:
konsti 2023-12-19 13:19:27 +01:00 committed by GitHub
parent 114548d945
commit 9e2bbee7f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,7 +104,10 @@ impl LockedFile {
match file.file().try_lock_exclusive() {
Ok(()) => Ok(Self(file)),
Err(err) if err.kind() == std::io::ErrorKind::WouldBlock => {
warn_user!("Waiting to acquire lock on directory");
warn_user!(
"Waiting to acquire lock on {}",
path.as_ref().parent().unwrap_or(path.as_ref()).display()
);
file.file().lock_exclusive()?;
Ok(Self(file))
}