Made download directory creation recursive
This commit is contained in:
parent
be24952d31
commit
ded4f9d2c0
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue