修复ToolFile中保存的错误

This commit is contained in:
2025-11-12 09:54:47 +08:00
parent 64e0bf2282
commit b6d2f38e72

View File

@@ -318,7 +318,7 @@ namespace Convention
}
public void SaveAsText(string data)
{
using var fs = new FileStream(OriginPath, FileMode.CreateNew, FileAccess.Write);
using var fs = new FileStream(OriginPath, FileMode.Create, FileAccess.Write);
using var sw = new StreamWriter(fs);
sw.Write(data);
sw.Flush();
@@ -332,7 +332,7 @@ namespace Convention
}
else
{
using var fs = new FileStream(path, FileMode.CreateNew, FileAccess.Write);
using var fs = new FileStream(path, FileMode.Create, FileAccess.Write);
fs.Write(outdata, 0, outdata.Length);
fs.Flush();
}