From 35a5679b98324a63b0902f633148c1143fbd166a Mon Sep 17 00:00:00 2001 From: Vika Date: Sat, 22 Jul 2023 19:24:07 +0300 Subject: media: fix improper path joining --- kittybox-rs/src/media/storage/file.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kittybox-rs/src/media') diff --git a/kittybox-rs/src/media/storage/file.rs b/kittybox-rs/src/media/storage/file.rs index cb9cadb..59723d5 100644 --- a/kittybox-rs/src/media/storage/file.rs +++ b/kittybox-rs/src/media/storage/file.rs @@ -141,7 +141,7 @@ impl MediaStore for FileStore { domain: &str, filename: &str, ) -> Result<(Metadata, Pin> + Send>>)> { - let path = self.base.join(format!("{}{}", domain, filename)); + let path = self.base.join(format!("{}/{}", domain, filename)); debug!("Path: {}", path.display()); let file = OpenOptions::new() @@ -185,8 +185,8 @@ impl MediaStore for FileStore { filename: &str, range: (Bound, Bound) ) -> Result> + Send>>> { - let path = self.base.join(format!("{}{}", domain, filename)); - let metapath = self.base.join(format!("{}{}.json", domain, filename)); + let path = self.base.join(format!("{}/{}", domain, filename)); + let metapath = self.base.join(format!("{}/{}.json", domain, filename)); debug!("Path: {}, metadata: {}", path.display(), metapath.display()); let mut file = OpenOptions::new() -- cgit 1.4.1