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