Folders no longer get hidden

This commit is contained in:
Fierelier 2018-09-28 20:00:14 +02:00
parent 7c7aefeddc
commit 936b3a9000

View File

@ -41,8 +41,9 @@ def exceptionCleanup():
print("Attempting cleanup.")
print("\nMaking folders visible...")
try:
ctypes.windll.kernel32.SetFileAttributesW(appPath,128)
ctypes.windll.kernel32.SetFileAttributesW(originalAppPath,128)
#ctypes.windll.kernel32.SetFileAttributesW(appPath,128)
#ctypes.windll.kernel32.SetFileAttributesW(originalAppPath,128)
pass
except Exception as e:
success = False
print(str(e))
@ -126,7 +127,7 @@ def loadMods(output = False):
os.rename(appPath,originalAppPath)
os.rename(tmpAppPath,appPath)
ctypes.windll.kernel32.SetFileAttributesW(originalAppPath,2)
#ctypes.windll.kernel32.SetFileAttributesW(originalAppPath,2)
if output: print("\nMods have been loaded!")
return True
@ -139,7 +140,7 @@ def unloadMods(output = False):
print("Removing cloned app folder...")
shutil.rmtree(appPath)
os.rename(originalAppPath,appPath)
ctypes.windll.kernel32.SetFileAttributesW(appPath,128)
#ctypes.windll.kernel32.SetFileAttributesW(appPath,128)
if output: print("\nUnloading mods successful.")
return True
@ -217,7 +218,7 @@ def checkUp():
choice = input("Do you wish to set up that folder for mod-use? (y/n)\n")
if choice == "y":
os.makedirs(modPath)
ctypes.windll.kernel32.SetFileAttributesW(modPath,2)
#ctypes.windll.kernel32.SetFileAttributesW(modPath,2)
return
if choice == "n": sys.exit(-1)