Commits

Georg Brandl  committed 0df2870

Fix the fix for #82.

  • Participants
  • Parent commits 3994238

Comments (0)

Files changed (1)

File sphinx/environment.py

         Process docutils-generated dependency info.
         """
         cwd = os.getcwd()
+        frompath = path.join(path.normpath(self.srcdir), 'dummy')
         deps = doctree.settings.record_dependencies
         if not deps:
             return
         for dep in deps.list:
             # the dependency path is relative to the working dir, so get
             # one relative to the srcdir
-            fullpath = path.normpath(path.join(cwd, dep))
-            relpath = fullpath[len(path.normpath(self.srcdir))+len(path.sep):]
+            relpath = relative_path(frompath,
+                                    path.normpath(path.join(cwd, dep)))
             self.dependencies.setdefault(docname, set()).add(relpath)
 
     def process_downloads(self, docname, doctree):