Skip to content

Commit 7342695

Browse files
Use os.path.relpath in Version.get_conf_py_path
1 parent 32e4933 commit 7342695

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

readthedocs/builds/models.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,8 @@ def get_downloads(self, pretty=False):
185185

186186
def get_conf_py_path(self):
187187
conf_py_path = self.project.conf_dir(self.slug)
188-
if not conf_py_path.endswith('/'):
189-
conf_py_path += '/'
190188
checkout_prefix = self.project.checkout_path(self.slug)
191-
conf_py_path = conf_py_path[len(checkout_prefix):]
189+
conf_py_path = os.path.relpath(conf_py_path, checkout_prefix)
192190
return conf_py_path
193191

194192
def get_build_path(self):

0 commit comments

Comments
 (0)