On Cygwin systems Python needs a little help determining if a path is an absolute Windows path or not, so that it does not treat those as relative, which results in bad paths like: '..\\C:\\ \\some_source_code_file.cc'
(path)
| 178 | |
| 179 | |
| 180 | def _IsWindowsAbsPath(path): |
| 181 | """ |
| 182 | On Cygwin systems Python needs a little help determining if a path |
| 183 | is an absolute Windows path or not, so that |
| 184 | it does not treat those as relative, which results in bad paths like: |
| 185 | '..\\C:\\<some path>\\some_source_code_file.cc' |
| 186 | """ |
| 187 | return path.startswith(("c:", "C:")) |
| 188 | |
| 189 | |
| 190 | def _FixPaths(paths, separator="\\"): |