mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
Fix new (nullability) compiler warnings
This commit is contained in:
@@ -247,7 +247,13 @@ namespace Semmle.Extraction
|
||||
}
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(nested));
|
||||
var directoryName = Path.GetDirectoryName(nested);
|
||||
if (directoryName is null)
|
||||
{
|
||||
logger.Log(Severity.Warning, "Failed to get directory name from path '" + nested + "'.");
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
Directory.CreateDirectory(directoryName);
|
||||
}
|
||||
catch (PathTooLongException)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user