summaryrefslogtreecommitdiff
path: root/sphinx/util/osutil.py
diff options
context:
space:
mode:
authoranatoly techtonik <techtonik@gmail.com>2015-10-10 16:40:59 +0300
committeranatoly techtonik <techtonik@gmail.com>2016-02-09 10:45:11 +0300
commit9c53796f87e5957744bcc8b990ef8387446b9964 (patch)
tree681d9c4727e32750f48427a6925d175d6ecd0263 /sphinx/util/osutil.py
parentaef2d8cffba402955f666b9e5447017c5188b411 (diff)
downloadsphinx-git-9c53796f87e5957744bcc8b990ef8387446b9964.tar.gz
add inverse of util.os_path for canonical path generation
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r--sphinx/util/osutil.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py
index 5bfbcabc4..9177f42c4 100644
--- a/sphinx/util/osutil.py
+++ b/sphinx/util/osutil.py
@@ -38,6 +38,10 @@ SEP = "/"
def os_path(canonicalpath):
return canonicalpath.replace(SEP, path.sep)
+
+def canon_path(nativepath):
+ """Return path in OS-independent form"""
+ return nativepath.replace(path.sep, SEP)
def relative_uri(base, to):