Ticket #706: win32_port-r1251.diff
| File win32_port-r1251.diff, 3.1 kB (added by ttressieres, 2 years ago) |
|---|
-
doxygentrac.py
old new 147 147 req.hdf['doxygen.wiki_page'] = wiki 148 148 return 'doxygen.cs', 'text/html' 149 149 # use configured Doxygen index 150 path = os.path.join(self.base_path, self.default_doc,151 self.html_output, self.index)150 path = posixpath.join(self.base_path, self.default_doc, 151 self.html_output, self.index) 152 152 153 153 # view 154 154 mimetype = mimetypes.guess_type(path)[0] … … 184 184 185 185 for doc in os.listdir(self.base_path): 186 186 # Search in documentation directories 187 path = os.path.join(self.base_path, doc)187 path = posixpath.join(self.base_path, doc + '/' + self.html_output) 188 188 if os.path.isdir(path): 189 index = os.path.join(path, 'search.idx')189 index = posixpath.join(path, 'search.idx') 190 190 if os.path.exists(index): 191 191 creation = os.path.getctime(index) 192 192 for result in self._search_in_documentation(doc, keywords): 193 result['url'] = req.href.doxygen(doc) + '/' \193 result['url'] = req.href.doxygen(doc) + '/' + self.html_output + '/' \ 194 194 + result['url'] 195 195 yield result['url'], result['name'], creation, \ 196 196 'doxygen', None 197 197 198 198 # Search in common documentation directory 199 index = os.path.join(self.base_path, 'search.idx')199 index = posixpath.join(self.base_path, 'search.idx') 200 200 if os.path.exists(index): 201 201 creation = os.path.getctime(index) 202 202 for result in self._search_in_documentation('', keywords): … … 249 249 if not doc and not file: 250 250 return ('index', None, None) 251 251 if doc: 252 doc = os.path.join(*doc)252 doc = posixpath.join(*doc) 253 253 else: 254 254 if self.default_doc: # we can't stay at the 'doxygen/' level 255 255 return 'redirect', None, '/'.join([self.default_doc, … … 260 260 261 261 def lookup(file, category='undefined'): 262 262 """Build (full path, relative link) and check if path exists.""" 263 path = os.path.join(self.base_path, doc, file)263 path = posixpath.join(self.base_path, doc, file) 264 264 existing_path = os.path.exists(path) and path 265 265 link = doc+'/'+file 266 266 self.log.debug(' %s file %s' % (category, existing_path or … … 330 330 331 331 def _search_in_documentation(self, doc, keywords): 332 332 # Open index file for documentation 333 index = os.path.join(self.base_path, doc, 'search.idx')333 index = posixpath.join(self.base_path, doc + '/' + self.html_output, 'search.idx') 334 334 if os.path.exists(index): 335 fd = open(index )335 fd = open(index, 'rb') 336 336 337 337 # Search for keywords in index 338 338 results = []
