Removed comment, changed winreg.OpenKey() argument, ensured terminating / for file path
parent
8904632b06
commit
0e224d46ab
|
@ -140,9 +140,8 @@ def main():
|
|||
|
||||
if systemName == "Windows":
|
||||
# Oh god why do we have to use the registry!
|
||||
# "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Valve\Steam\InstallPath" "InstallPath"
|
||||
accessReg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
|
||||
accessKey = winreg.OpenKey(accessReg, "SOFTWARE\WOW6432Node\Valve\Steam\InstallPath")
|
||||
accessKey = winreg.OpenKey(accessReg, "SOFTWARE\\WOW6432Node\\Valve\\Steam\\")
|
||||
targetDir = winreg.QueryValue(accessKey, "InstallPath")
|
||||
|
||||
if systemName == "Linux":
|
||||
|
@ -152,6 +151,7 @@ def main():
|
|||
print("Java-based OSes are not supported yet by tfscript.", file=sys.stderr)
|
||||
return 2
|
||||
|
||||
if targetDir[-1] != '/': targetDir += '/'
|
||||
targetDir += "steamapps/common/Team Fortress 2/tf/cfg"
|
||||
else:
|
||||
targetDir = args.directory
|
||||
|
|
Loading…
Reference in New Issue