Sanity-check for folder-removal

This commit is contained in:
Fierelier 2019-01-07 00:14:18 +01:00
parent 24df9bc2fc
commit 779e03291c

View File

@ -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)