From 53fe2362fcf04d0478d6f223b58da7a8e5b9569c Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 2 Jun 2024 01:43:25 +0000 Subject: [PATCH] Fix path-buf-push-overwrite Signed-off-by: Jason Volk --- src/service/media/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/service/media/mod.rs b/src/service/media/mod.rs index 5521011d..0697577f 100644 --- a/src/service/media/mod.rs +++ b/src/service/media/mod.rs @@ -559,9 +559,7 @@ mod tests { .db .create_file_metadata(None, mxc, width, height, Some(content_disposition), Some(content_type)) .unwrap(); - let mut r = PathBuf::new(); - r.push("/tmp"); - r.push("media"); + let mut r = PathBuf::from("/tmp/media"); // r.push(base64::encode_config(key, base64::URL_SAFE_NO_PAD)); // use the sha256 hash of the key as the file name instead of the key itself // this is because the base64 encoded key can be longer than 255 characters.