Commit 31013843 by willmcgugan

Fix to allow backrefs in command line apps

parent 2f6887fb
...@@ -67,6 +67,7 @@ __all__ = ['OpenerError', ...@@ -67,6 +67,7 @@ __all__ = ['OpenerError',
'HTTPOpener'] 'HTTPOpener']
from fs.path import pathsplit, join, iswildcard, normpath from fs.path import pathsplit, join, iswildcard, normpath
from os import getcwd
import os.path import os.path
import re import re
from urlparse import urlparse from urlparse import urlparse
...@@ -83,6 +84,9 @@ def _expand_syspath(path): ...@@ -83,6 +84,9 @@ def _expand_syspath(path):
if path is None: if path is None:
return path return path
path = os.path.expanduser(os.path.expandvars(path)) path = os.path.expanduser(os.path.expandvars(path))
path = path.replace('\\', '/')
if not path.startswith('/'):
path = os.path.join(getcwd(), path)
path = normpath(path) path = normpath(path)
return path return path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment