breathe-doc / breathe

ReStructuredText and Sphinx bridge to Doxygen
https://breathe-doc.org
Other
752 stars 201 forks source link

Path are not always properly compared on win32 #124

Closed ela34 closed 10 years ago

ela34 commented 10 years ago

On windows path in include files (at least in c/c++) are usually separated by "/"and not "\". (e.g. "sys/includes.h") but the method to compare path use python os:sep which is "\" on win32 and "/" on linux, causing comparison to fail on win32. Here is a quick and dirty patch to fix this:

754c754,755
<         return bool(file_path.count(self.sep))

---
>         return bool(file_path.count('\\')) or bool(file_path.count('/'))   
> #       return bool(file_path.count(self.sep))
michaeljones commented 10 years ago

Hi,

Thanks for trying Breathe and thank you for taking the time to report this and suggest a fix. I wonder if we ever need to check for the back slash? Probably can't do any harm though.

I will add the patch. Would you like a new release to work with?

Cheers, Michael

michaeljones commented 10 years ago

I am happy to credit you with the change in the commit logs by using:

git commit --author="ela34 <ela34@example.com>"

Do you have an email address I can use? Or shall I just use the example? No pressure, just an option.

Cheers, Michael

ela34 commented 10 years ago

Hi Michael, Thanks for the proposal. If this is OK for you, you can credit my company 'AwoX' (as this was a team effort). This would be nice .

Thanks. -- Eric

michaeljones commented 10 years ago

As in awox.com? Certainly. Thanks again.

michaeljones commented 10 years ago

Merged and pushed. Thank you again!