Mercurial > web-gnusto
changeset 82:2869ebf025eb
Path to if-archive mirror dir is determined more robustly in xhr_proxy.py.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Wed, 21 May 2008 11:44:51 -0700 |
parents | 1765c604e9b9 |
children | e813e427fbe6 |
files | cgi-bin/xhr_proxy.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/cgi-bin/xhr_proxy.py Wed May 21 11:32:20 2008 -0700 +++ b/cgi-bin/xhr_proxy.py Wed May 21 11:44:51 2008 -0700 @@ -15,7 +15,11 @@ else: path = "" -ROOT_DIR = os.path.abspath("if-archive") +__main__ = __import__("__main__") + +mydir = os.path.dirname(__main__.__file__) + +ROOT_DIR = os.path.abspath(os.path.join(mydir, "..", "if-archive")) ZCODE_REGEXP = r".*\.z[1-8]$" localpath = os.path.normpath(os.path.join(ROOT_DIR, path))