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