Skip to content

Commit

Permalink
Return file hash on an existing file. (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoquick authored Dec 21, 2023
1 parent 627024f commit 34103af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/backend/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ pub async fn write_file<'a>(
trace!("Check catalog at {path:?}");

if path.exists() {
return Err(anyhow!("This file already exists for this public key."));
return Err(anyhow!(
"This file already exists for this public key. Its hash is: {file_hash}"
));
}

// Access the updated MIME type after the loop
Expand Down

0 comments on commit 34103af

Please sign in to comment.