mirror of
https://github.com/oSumAtrIX/free-librespot.git
synced 2025-12-19 18:04:20 +00:00
Fix incorrect audio cache directory reference
This commit is contained in:
parent
414383db18
commit
06f5aa9c90
1 changed files with 4 additions and 4 deletions
|
|
@ -94,16 +94,16 @@ impl Cache {
|
||||||
mkdir_existing(path.parent().unwrap()).unwrap();
|
mkdir_existing(path.parent().unwrap()).unwrap();
|
||||||
|
|
||||||
let mut cache_file = File::create(path).unwrap_or_else(|_e| {
|
let mut cache_file = File::create(path).unwrap_or_else(|_e| {
|
||||||
::std::fs::remove_dir_all(&self.root.join("files")).unwrap();
|
::std::fs::remove_dir_all(&self.audio_root.join("files")).unwrap();
|
||||||
mkdir_existing(&self.root.join("files")).unwrap();
|
mkdir_existing(&self.audio_root.join("files")).unwrap();
|
||||||
|
|
||||||
let path = self.file_path(file);
|
let path = self.file_path(file);
|
||||||
mkdir_existing(path.parent().unwrap()).unwrap();
|
mkdir_existing(path.parent().unwrap()).unwrap();
|
||||||
File::create(path).unwrap()
|
File::create(path).unwrap()
|
||||||
});
|
});
|
||||||
::std::io::copy(contents, &mut cache_file).unwrap_or_else(|_e| {
|
::std::io::copy(contents, &mut cache_file).unwrap_or_else(|_e| {
|
||||||
::std::fs::remove_dir_all(&self.root.join("files")).unwrap();
|
::std::fs::remove_dir_all(&self.audio_root.join("files")).unwrap();
|
||||||
mkdir_existing(&self.root.join("files")).unwrap();
|
mkdir_existing(&self.audio_root.join("files")).unwrap();
|
||||||
|
|
||||||
let path = self.file_path(file);
|
let path = self.file_path(file);
|
||||||
mkdir_existing(path.parent().unwrap()).unwrap();
|
mkdir_existing(path.parent().unwrap()).unwrap();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue