Made download directory creation recursive

This commit is contained in:
uh_wot 2020-05-17 03:26:17 +02:00
parent be24952d31
commit ded4f9d2c0
1 changed files with 3 additions and 4 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
import json
import os.path as path
from os import mkdir
from os import mkdir, makedirs
import deemix.utils.localpaths as localpaths
@ -28,8 +28,7 @@ def initSettings():
if settings['downloadLocation'] == "":
settings['downloadLocation'] = path.join(localpaths.getHomeFolder(), 'deemix Music')
saveSettings(settings)
if not path.isdir(settings['downloadLocation']):
mkdir(settings['downloadLocation'])
makedirs(settings['downloadLocation'], exist_ok=True)
return settings