summaryrefslogtreecommitdiff
path: root/sphinx/util/osutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r--sphinx/util/osutil.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py
index 0645ee46f..46f908292 100644
--- a/sphinx/util/osutil.py
+++ b/sphinx/util/osutil.py
@@ -36,6 +36,7 @@ EINVAL = getattr(errno, 'EINVAL', 0)
# hangover from more *nix-oriented origins.
SEP = "/"
+
def os_path(canonicalpath):
return canonicalpath.replace(SEP, path.sep)
@@ -59,7 +60,7 @@ def relative_uri(base, to):
if len(b2) == 1 and t2 == ['']:
# Special case: relative_uri('f/index.html','f/') should
# return './', not ''
- return '.' + SEP
+ return '.' + SEP
return ('..' + SEP) * (len(b2)-1) + SEP.join(t2)
@@ -147,6 +148,7 @@ def copyfile(source, dest):
no_fn_re = re.compile(r'[^a-zA-Z0-9_-]')
+
def make_filename(string):
return no_fn_re.sub('', string) or 'sphinx'
@@ -167,6 +169,7 @@ def safe_relpath(path, start=None):
except ValueError:
return path
+
def find_catalog(docname, compaction):
if compaction:
ret = docname.split(SEP, 1)[0]