Skip to content

Commit

Permalink
Merge pull request #12 from MeGaNeKoS/stable
Browse files Browse the repository at this point in the history
fix: replace setting file destination from user documents folder to current folder.
  • Loading branch information
robbyz512 authored Jun 12, 2024
2 parents 2b0b44f + ecdfe4a commit f4f19f4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mpaths.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import traceback

try:
hkey = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\WOW6432Node\Valve\Steam")
hkey = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\WOW6432Node\Valve\Steam")
except Exception as exception:
hkey = None
with open(os.path.join(os.getcwd(), 'logs\\registry.txt'), 'w') as file:
Expand All @@ -23,9 +23,8 @@

# when dota2 is not inside Steam folder then set new steam directory from 'dota2path_minify.txt
# this text file is created and set by the user in validatefiles.py during startup
if not os.path.exists(os.path.join(steam_dir, 'common\dota 2 beta\game\bin\win64\dota2.exe')):
documents = os.path.join(os.path.expanduser('~'), 'Documents')
path_file = os.path.join(documents, 'dota2path_minify.txt')
if not os.path.exists(os.path.join(steam_dir, 'steamapps\\common\\dota 2 beta\\game\\bin\\win64\\dota2.exe')):
path_file = os.path.join(os.getcwd(), 'dota2path_minify.txt')

# make sure the text file exists
if not os.path.exists(path_file):
Expand Down

0 comments on commit f4f19f4

Please sign in to comment.