blob: 01bece60f21e80f5d4494e3bf0ce39a98c25f738 [file] [log] [blame] [edit]
--- asciidoc-8.6.7/a2x.py.orig 2012-03-14 03:07:34 +0400
+++ asciidoc-8.6.7/a2x.py 2012-03-27 18:16:41 +0400
@@ -390,6 +390,11 @@
else:
self.asciidoc = None
# From global conf directory.
+ global CONF_DIR
+ if not os.path.isdir (CONF_DIR) and os.name == 'nt':
+ app_prefix = sys.prefix
+ if len (app_prefix) > 0:
+ CONF_DIR = os.path.join (app_prefix, 'etc', 'asciidoc')
conf_files.append(os.path.join(CONF_DIR, CONF_FILE))
# From $HOME directory.
home_dir = os.environ.get('HOME')
--- asciidoc-8.6.7/asciidoc.py.orig 2012-03-14 03:07:34 +0400
+++ asciidoc-8.6.7/asciidoc.py 2012-03-27 18:16:41 +0400
@@ -4556,6 +4556,12 @@
APP_FILE = os.path.realpath(cmd)
global APP_DIR
APP_DIR = os.path.dirname(APP_FILE)
+ global CONF_DIR
+ if not os.path.isdir (CONF_DIR) and os.name == 'nt':
+ app_dir_real = os.path.realpath (APP_DIR)
+ app_prefix, app_last_dir = os.path.split (app_dir_real)
+ if len (app_prefix) > 0 and app_last_dir == 'bin':
+ CONF_DIR = os.path.join (app_prefix, 'etc', 'asciidoc')
global USER_DIR
USER_DIR = userdir()
if USER_DIR is not None: