Fixed folder creation

Fixed an Issue where if a nested folder was used it would not create all of them but only the parent and then crash.
main v0.3
Peery 10 months ago
parent be194b2ad6
commit 69f387ce5a
Signed by: pandro
SSH Key Fingerprint: SHA256:iBUZSuDxqYr4hYpe9U3BA9NJmXKpbGt4H0S8hUwIbrA

@ -389,7 +389,7 @@ class ModManager:
parent_dir = os.path.join(self.__settings.get_game_folder(), file).split(os.path.basename(file))[0]\ parent_dir = os.path.join(self.__settings.get_game_folder(), file).split(os.path.basename(file))[0]\
.replace("/", os.path.sep) .replace("/", os.path.sep)
if not os.path.exists(parent_dir): if not os.path.exists(parent_dir):
os.mkdir(parent_dir) os.makedirs(parent_dir)
if not os.path.exists(os.path.join(self.__settings.get_game_folder().replace("/", os.path.sep), if not os.path.exists(os.path.join(self.__settings.get_game_folder().replace("/", os.path.sep),
file.replace("/", os.path.sep))): file.replace("/", os.path.sep))):
self.__logger.debug( self.__logger.debug(

Loading…
Cancel
Save