changeset 44146:9e367157a990 stable

resourceutil: correct the root path for file based lookup under py2exe This silly copy/paste error caused "Mercurial" to be truncated from "C:\Program Files". The fact that "helptext" and "defaultrc" are now in a subpackage of "mercurial" added it back on, and everything seemed to work. But that broke if not installed to the default directory, and also caused TortoiseHg to look at Mercurial's config files instead of its own. Differential Revision: https://phab.mercurial-scm.org/D8054
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 30 Jan 2020 23:48:45 -0500
parents 62111bc5ff87
children f010a80ec967
files mercurial/utils/resourceutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/utils/resourceutil.py	Fri Jan 24 20:27:59 2020 -0800
+++ b/mercurial/utils/resourceutil.py	Thu Jan 30 23:48:45 2020 -0500
@@ -33,7 +33,7 @@
 if mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app':
     # executable version (py2exe) doesn't support __file__
     datapath = os.path.dirname(pycompat.sysexecutable)
-    _rootpath = os.path.dirname(datapath)
+    _rootpath = datapath
 else:
     datapath = os.path.dirname(os.path.dirname(pycompat.fsencode(__file__)))
     _rootpath = os.path.dirname(datapath)