Skip to content

Commit

Permalink
Also check payloads when committing
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
  • Loading branch information
rydrman committed Feb 27, 2024
1 parent 5a53f60 commit dd57cca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/spfs/src/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,11 @@ where
let node = node.into_owned();
let fut = async move {
let entry = &node.entry;
if self.repo.has_object(entry.object).await {
let (has_object, has_payload) = tokio::join!(
self.repo.has_object(entry.object),
self.repo.has_payload(entry.object),
);
if has_object && has_payload {
return Ok(CommitBlobResult::AlreadyExists(node));
}
let created = if entry.is_symlink() {
Expand Down

0 comments on commit dd57cca

Please sign in to comment.