Silence unnecessary log (#22750)

It is expected that an unsaved buffer would have no
file.

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2025-01-06 20:21:22 -07:00 committed by GitHub
parent 6fce53651b
commit 92b9d80549
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -404,7 +404,7 @@ impl LocalBufferStore {
cx: &AppContext,
) -> Task<Result<Option<String>>> {
let Some(file) = buffer.read(cx).file() else {
return Task::ready(Err(anyhow!("buffer has no file")));
return Task::ready(Ok(None));
};
let worktree_id = file.worktree_id(cx);
let path = file.path().clone();