C#: Fix always-null bug in TRAP writer

This commit is contained in:
Tom Hvitved
2018-12-07 15:46:27 +01:00
parent 9e73ed71b9
commit e05bbb0f10

View File

@@ -285,7 +285,7 @@ namespace Semmle.Extraction
public static string NestPaths(ILogger logger, string outerpath, string innerpath, InnerPathComputation innerPathComputation)
{
string nested = innerpath;
if (outerpath != null || outerpath.Length != 0)
if (!string.IsNullOrEmpty(outerpath))
{
if (!Path.IsPathRooted(innerpath) && innerPathComputation == InnerPathComputation.ABSOLUTE)
innerpath = Path.GetFullPath(innerpath);