From ded4f9d2c0b0a6524e8704219e2a9bdea5a15ae0 Mon Sep 17 00:00:00 2001 From: uh_wot <3631986-uh_wot@users.noreply.gitlab.com> Date: Sun, 17 May 2020 03:26:17 +0200 Subject: [PATCH] Made download directory creation recursive --- deemix/app/settings.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/deemix/app/settings.py b/deemix/app/settings.py index e9269ff..c449eaf 100644 --- a/deemix/app/settings.py +++ b/deemix/app/settings.py @@ -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 @@ -27,9 +27,8 @@ def initSettings(): settingsCheck() if settings['downloadLocation'] == "": settings['downloadLocation'] = path.join(localpaths.getHomeFolder(), 'deemix Music') - saveSettings(settings) - if not path.isdir(settings['downloadLocation']): - mkdir(settings['downloadLocation']) + saveSettings(settings) + makedirs(settings['downloadLocation'], exist_ok=True) return settings