|
|
|
@ -155,9 +155,17 @@ public class MetadataImportService(
|
|
|
|
|
var cmInfoList = new Dictionary<FilePath, ConnectedModelInfo>(); |
|
|
|
|
foreach (var cmInfoPath in directory.EnumerateFiles("*.cm-info.json", SearchOption.AllDirectories)) |
|
|
|
|
{ |
|
|
|
|
var cmInfo = JsonSerializer.Deserialize<ConnectedModelInfo>( |
|
|
|
|
await cmInfoPath.ReadAllTextAsync().ConfigureAwait(false) |
|
|
|
|
); |
|
|
|
|
ConnectedModelInfo? cmInfo; |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
cmInfo = JsonSerializer.Deserialize<ConnectedModelInfo>( |
|
|
|
|
await cmInfoPath.ReadAllTextAsync().ConfigureAwait(false) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
catch (JsonException) |
|
|
|
|
{ |
|
|
|
|
cmInfo = null; |
|
|
|
|
} |
|
|
|
|
if (cmInfo == null) |
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|