diff --git a/UniversalModloader.py b/UniversalModloader.py index a40b8fe..1546c1a 100644 --- a/UniversalModloader.py +++ b/UniversalModloader.py @@ -182,7 +182,12 @@ def unloadMods(output = False): return print("Removing cloned app folder...") - shutil.rmtree(appPath) + try: + shutil.rmtree(appPath) + except: + if output: print("Can't delete folder! Is it in use?") + return + os.rename(originalAppPath,appPath) #ctypes.windll.kernel32.SetFileAttributesW(appPath,128)