We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a1db77 commit a3a70adCopy full SHA for a3a70ad
src/AST/TranslationUnit.cs
@@ -62,15 +62,10 @@ public string FileRelativeDirectory
62
if (fileRelativeDirectory != null)
63
return fileRelativeDirectory;
64
65
- if (IncludePath == null)
66
- return string.Empty;
+ var dir = Path.GetDirectoryName(IncludePath) ?? string.Empty;
+ fileRelativeDirectory = dir.Replace('\\', '/');
67
68
- var path = IncludePath.Replace('\\', '/');
69
- var index = path.LastIndexOf('/');
70
- if (index == -1)
71
72
-
73
- return fileRelativeDirectory = path.Substring(0, index);
+ return fileRelativeDirectory;
74
}
75
76
0 commit comments