mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Don't create directories for the audio cache if it disabled
This commit is contained in:
parent
c14c254c6b
commit
b34032690b
1 changed files with 4 additions and 2 deletions
|
@ -28,8 +28,10 @@ fn mkdir_existing(path: &Path) -> io::Result<()> {
|
|||
|
||||
impl Cache {
|
||||
pub fn new(audio_location: PathBuf, system_location: PathBuf, use_audio_cache: bool) -> Cache {
|
||||
mkdir_existing(&audio_location).unwrap();
|
||||
mkdir_existing(&audio_location.join("files")).unwrap();
|
||||
if use_audio_cache == true {
|
||||
mkdir_existing(&audio_location).unwrap();
|
||||
mkdir_existing(&audio_location.join("files")).unwrap();
|
||||
}
|
||||
mkdir_existing(&system_location).unwrap();
|
||||
|
||||
Cache {
|
||||
|
|
Loading…
Reference in a new issue