diff options
author | Vika <vika@fireburn.ru> | 2023-07-22 19:24:07 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2023-07-22 19:24:07 +0300 |
commit | 35a5679b98324a63b0902f633148c1143fbd166a (patch) | |
tree | 672ba12bb29d140a41c2a54a78c521b145683433 /kittybox-rs/src/media | |
parent | 2443b3592b6df4b717966f165ef5007de2cc22c8 (diff) | |
download | kittybox-35a5679b98324a63b0902f633148c1143fbd166a.tar.zst |
media: fix improper path joining
Diffstat (limited to 'kittybox-rs/src/media')
-rw-r--r-- | kittybox-rs/src/media/storage/file.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<Box<dyn tokio_stream::Stream<Item = std::io::Result<bytes::Bytes>> + 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<u64>, Bound<u64>) ) -> Result<Pin<Box<dyn tokio_stream::Stream<Item = std::io::Result<bytes::Bytes>> + 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() |