Ticket #706: win32_port-r1251.diff

File win32_port-r1251.diff, 3.1 kB (added by ttressieres, 2 years ago)

some change to win32 port - use posixpath

  • doxygentrac.py

    old new  
    147147                req.hdf['doxygen.wiki_page'] = wiki 
    148148                return 'doxygen.cs', 'text/html' 
    149149            # 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) 
    152152 
    153153        # view  
    154154        mimetype = mimetypes.guess_type(path)[0] 
     
    184184 
    185185        for doc in os.listdir(self.base_path): 
    186186            # Search in documentation directories 
    187             path = os.path.join(self.base_path, doc
     187            path = posixpath.join(self.base_path, doc + '/' + self.html_output
    188188            if os.path.isdir(path): 
    189                 index = os.path.join(path, 'search.idx') 
     189                index = posixpath.join(path, 'search.idx') 
    190190                if os.path.exists(index): 
    191191                    creation = os.path.getctime(index) 
    192192                    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 + '/'
    194194                          + result['url'] 
    195195                        yield result['url'], result['name'], creation, \ 
    196196                          'doxygen', None 
    197197 
    198198            # Search in common documentation directory 
    199             index = os.path.join(self.base_path, 'search.idx') 
     199            index = posixpath.join(self.base_path, 'search.idx') 
    200200            if os.path.exists(index): 
    201201                creation = os.path.getctime(index) 
    202202                for result in self._search_in_documentation('', keywords): 
     
    249249        if not doc and not file: 
    250250            return ('index', None, None)  
    251251        if doc: 
    252             doc = os.path.join(*doc) 
     252            doc = posixpath.join(*doc) 
    253253        else: 
    254254            if self.default_doc: # we can't stay at the 'doxygen/' level 
    255255                return 'redirect', None, '/'.join([self.default_doc, 
     
    260260         
    261261        def lookup(file, category='undefined'): 
    262262            """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) 
    264264            existing_path = os.path.exists(path) and path 
    265265            link = doc+'/'+file 
    266266            self.log.debug(' %s file %s' % (category, existing_path or 
     
    330330 
    331331    def _search_in_documentation(self, doc, keywords): 
    332332        # 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') 
    334334        if os.path.exists(index): 
    335             fd = open(index
     335            fd = open(index, 'rb'
    336336 
    337337            # Search for keywords in index 
    338338            results = []