From 61d0cb1f485c9c83c037021c99e9b4350a46d544 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 30 May 2021 12:34:30 +0100 Subject: [PATCH] Check that directory exists --- theme.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/theme.py b/theme.py index 83da4f005..759d792a2 100644 --- a/theme.py +++ b/theme.py @@ -63,7 +63,8 @@ def importTheme(baseDir: str, filename: str) -> bool: if not os.path.isdir(themeDir): os.mkdir(themeDir) copytree(tempThemeDir, themeDir) - os.remove(tempThemeDir) + if os.path.isdir(tempThemeDir): + os.remove(tempThemeDir) return os.path.isfile(themeDir + '/theme.json')