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.
2 parents 303f3f9 + da68c94 commit 6fa3f44Copy full SHA for 6fa3f44
ASFEnhance/Other/Command.cs
@@ -216,8 +216,6 @@ internal static class Command
216
{
217
try
218
219
- using var file = File.Open(filePath, FileMode.OpenOrCreate, FileAccess.ReadWrite);
220
- using var writer = new StreamWriter(file, Encoding.UTF8);
221
string result;
222
223
@@ -227,8 +225,7 @@ internal static class Command
227
225
228
226
result = string.Format("命令执行遇到内部错误: {0}, {1}", ex.Message, ex.StackTrace);
229
}
230
- await writer.WriteAsync(result).ConfigureAwait(false);
231
- await writer.FlushAsync().ConfigureAwait(false);
+ await File.WriteAllTextAsync(filePath, result).ConfigureAwait(false);
232
233
catch (Exception ex)
234
0 commit comments