From 06f5aa9c907f6702ecba4147d6291c1cc448b295 Mon Sep 17 00:00:00 2001 From: Sasha Hilton Date: Sat, 2 Jan 2021 23:31:37 +0000 Subject: [PATCH] Fix incorrect audio cache directory reference --- core/src/cache.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/cache.rs b/core/src/cache.rs index be46fbe..e711777 100644 --- a/core/src/cache.rs +++ b/core/src/cache.rs @@ -94,16 +94,16 @@ impl Cache { mkdir_existing(path.parent().unwrap()).unwrap(); let mut cache_file = File::create(path).unwrap_or_else(|_e| { - ::std::fs::remove_dir_all(&self.root.join("files")).unwrap(); - mkdir_existing(&self.root.join("files")).unwrap(); + ::std::fs::remove_dir_all(&self.audio_root.join("files")).unwrap(); + mkdir_existing(&self.audio_root.join("files")).unwrap(); let path = self.file_path(file); mkdir_existing(path.parent().unwrap()).unwrap(); File::create(path).unwrap() }); ::std::io::copy(contents, &mut cache_file).unwrap_or_else(|_e| { - ::std::fs::remove_dir_all(&self.root.join("files")).unwrap(); - mkdir_existing(&self.root.join("files")).unwrap(); + ::std::fs::remove_dir_all(&self.audio_root.join("files")).unwrap(); + mkdir_existing(&self.audio_root.join("files")).unwrap(); let path = self.file_path(file); mkdir_existing(path.parent().unwrap()).unwrap();