Browse Source

Fix TU.FileRelativeDirectory to be more robust against some paths.

pull/1543/head
Joao Matos 5 years ago committed by João Matos
parent
commit
f18022b57e
  1. 3
      src/AST/TranslationUnit.cs

3
src/AST/TranslationUnit.cs

@ -71,6 +71,9 @@ namespace CppSharp.AST @@ -71,6 +71,9 @@ namespace CppSharp.AST
var path = IncludePath.Replace('\\', '/');
var index = path.LastIndexOf('/');
if (index == -1)
return string.Empty;
return fileRelativeDirectory = path.Substring(0, index);
}
}

Loading…
Cancel
Save