fix: actually make multiboxing work

This commit is contained in:
Anna 2021-03-02 13:08:42 -05:00
parent 41dcbdaf8d
commit ced993bd0b
Signed by: anna
GPG Key ID: 0B391D8F06FCD9E0

View File

@ -134,8 +134,13 @@ namespace NoSoliciting.Ml {
using var exe = Resource.AsStream("NoSoliciting.NoSoliciting.MessageClassifier.exe");
Directory.CreateDirectory(pluginFolder);
var exePath = Path.Combine(pluginFolder, "NoSoliciting.MessageClassifier.exe");
using var exeFile = File.Create(exePath);
await exe.CopyToAsync(exeFile);
try {
using var exeFile = File.Create(exePath);
await exe.CopyToAsync(exeFile);
} catch (IOException ex) {
PluginLog.LogWarning($"Could not update classifier. Continuing as normal.\n{ex}");
}
return exePath;
}