diff options
author | David Sommerseth <davids@redhat.com> | 2011-02-04 20:04:38 +0100 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2011-02-04 20:04:38 +0100 |
commit | 7115143e1b9c5604482856ea8aecd91276c885c1 (patch) | |
tree | bfd2f2764d08a5bd8bb7e529af7cafb2a63142ee | |
parent | bcc4f7c2e36e63cda578cb38d52e5c6280c0c949 (diff) | |
download | rteval-7115143e1b9c5604482856ea8aecd91276c885c1.tar.gz rteval-7115143e1b9c5604482856ea8aecd91276c885c1.tar.xz rteval-7115143e1b9c5604482856ea8aecd91276c885c1.zip |
If the dirpath is an absolute path, go to the root dir before continuing.
This bug was triggered when using the mod_wsgi platform, where you are
not placed in the root directory by default.
-rw-r--r-- | server/xmlrpc_API1.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/xmlrpc_API1.py b/server/xmlrpc_API1.py index 71e23d6..064f1b2 100644 --- a/server/xmlrpc_API1.py +++ b/server/xmlrpc_API1.py @@ -45,6 +45,8 @@ class XMLRPC_API1(): def __mkdatadir(self, dirpath): startdir = os.getcwd() + if dirpath[0] == '/': + os.chdir('/') for dir in dirpath.split("/"): if dir is '': continue |