Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-01-22 16:52:32 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-01-22 16:52:32 +0300
commit5ce72f465be76ee3aa3179380fc925ba816b6c5f (patch)
treea5b30542ae42f41ece0150ea07ab742c4da03ca1 /sphinx/environment
parent424510e326f3fbdc30f34dcd2865e38edb38aa2d (diff)
parenta71028bf9e18cf9fb6314c8a13a467d724cd9328 (diff)
Merge branch '3.x'
Diffstat (limited to 'sphinx/environment')
-rw-r--r--sphinx/environment/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/sphinx/environment/__init__.py b/sphinx/environment/__init__.py
index 2121b3ee4..28599c977 100644
--- a/sphinx/environment/__init__.py
+++ b/sphinx/environment/__init__.py
@@ -10,6 +10,7 @@
import os
import pickle
+import posixpath
from collections import defaultdict
from copy import copy
from datetime import datetime
@@ -340,9 +341,9 @@ class BuildEnvironment:
docdir = path.dirname(self.doc2path(docname or self.docname,
base=None))
rel_fn = path.join(docdir, filename)
- # the path.abspath() might seem redundant, but otherwise artifacts
- # such as ".." will remain in the path
- return rel_fn, path.abspath(path.join(self.srcdir, rel_fn))
+
+ return (posixpath.normpath(rel_fn),
+ path.normpath(path.join(self.srcdir, rel_fn)))
@property
def found_docs(self) -> Set[str]: