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-07 03:21:22 +00:00
committed by GitHub
parent 6fce53651b
commit 92b9d80549
+1 -1
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();