From 34103af534e223f7110d2cee8a812361fc196b04 Mon Sep 17 00:00:00 2001 From: Hunter Beast Date: Thu, 21 Dec 2023 10:32:35 -0700 Subject: [PATCH] Return file hash on an existing file. (#57) --- src/backend/fs.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/fs.rs b/src/backend/fs.rs index bf9655b..41c2162 100755 --- a/src/backend/fs.rs +++ b/src/backend/fs.rs @@ -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