Browse Source

Try an alternative path separator when cleaning up file paths.

pull/329/head
triton 12 years ago
parent
commit
9b0f221334
  1. 6
      src/Generator/Passes/CleanUnitPass.cs

6
src/Generator/Passes/CleanUnitPass.cs

@ -36,6 +36,12 @@ namespace CppSharp.Passes
var path = DriverOptions.getIncludeDirs(i); var path = DriverOptions.getIncludeDirs(i);
int idx = filePath.IndexOf(path, System.StringComparison.Ordinal); int idx = filePath.IndexOf(path, System.StringComparison.Ordinal);
if (idx == -1)
{
path = path.Replace('/', '\\');
idx = filePath.IndexOf(path, System.StringComparison.Ordinal);
}
if (idx == -1) continue; if (idx == -1) continue;
string inc = filePath.Substring(path.Length); string inc = filePath.Substring(path.Length);

Loading…
Cancel
Save