From 3d6fe4268f692f42d7b768a224b95152a022ca17 Mon Sep 17 00:00:00 2001 From: Mauricio Date: Sat, 13 Mar 2021 14:54:30 -0400 Subject: [PATCH] don't mkdir outside download thread --- gameview.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/gameview.py b/gameview.py index eb295ea..49ae458 100644 --- a/gameview.py +++ b/gameview.py @@ -259,8 +259,6 @@ class AOCharMovie(QtGui.QLabel): if ini.read_ini_bool("AO2XP.ini", "General", "download characters"): url = "base/characters/"+p_char.lower()+"/"+emote_prefix+p_emote.lower()+".apng" url = url.replace(" ", "%20") - if not exists(AOpath+"characters/"+p_char): # gotta make sure the character folder exists, better safe than sorry - os.mkdir(AOpath+"characters/"+p_char) thread.start_new_thread(download_thread, (url, apng_path)) if exists(webp_path): @@ -270,8 +268,6 @@ class AOCharMovie(QtGui.QLabel): if ini.read_ini_bool("AO2XP.ini", "General", "download characters"): url = "base/characters/"+p_char.lower()+"/"+p_emote.lower()+".webp" url = url.replace(" ", "%20") - if not exists(AOpath+"characters/"+p_char): # gotta make sure the character folder exists, better safe than sorry - os.mkdir(AOpath+"characters/"+p_char) thread.start_new_thread(download_thread, (url, webp_path)) if exists(original_path): @@ -281,8 +277,6 @@ class AOCharMovie(QtGui.QLabel): if ini.read_ini_bool("AO2XP.ini", "General", "download characters"): url = "base/characters/"+p_char.lower()+"/"+emote_prefix+p_emote.lower()+".gif" url = url.replace(" ", "%20") - if not exists(AOpath+"characters/"+p_char): # gotta make sure the character folder exists, better safe than sorry - os.mkdir(AOpath+"characters/"+p_char) thread.start_new_thread(download_thread, (url, original_path)) if exists(alt_path): @@ -292,8 +286,6 @@ class AOCharMovie(QtGui.QLabel): if ini.read_ini_bool("AO2XP.ini", "General", "download characters"): url = "base/characters/"+p_char.lower()+"/"+emote_prefix+p_emote.lower()+".png" url = url.replace(" ", "%20") - if not exists(AOpath+"characters/"+p_char): # gotta make sure the character folder exists, better safe than sorry - os.mkdir(AOpath+"characters/"+p_char) thread.start_new_thread(download_thread, (url, alt_path)) if exists(placeholder_path): @@ -2297,8 +2289,6 @@ class gui(QtGui.QWidget): else: self.objectsnd = None if ini.read_ini_bool("AO2XP.ini", "General", "download sounds"): - if not exists(AOpath+"characters/"+charname.lower()): # gotta make sure the character folder exists, better safe than sorry - os.mkdir(AOpath+"characters/"+charname.lower()) thread.start_new_thread(download_thread, ("base/characters/"+charname.lower()+"/"+objecting.lower()+".wav", AOpath+"characters/"+charname.lower()+"/"+objecting.lower()+".wav")) thread.start_new_thread(download_thread, ("base/characters/"+charname.lower()+"/"+objecting.lower()+".opus", AOpath+"characters/"+charname.lower()+"/"+objecting.lower()+".wav"))