【修复】修复Luban.Server在linux平台(\n)和win平台(\r\n)生成的文本换行符不一样的问题(导致不同平台生成结果不一样)。统一为 \n
parent
02a7973f42
commit
5c038ca449
|
|
@ -27,6 +27,7 @@ namespace Luban.Job.Common.Utils
|
||||||
|
|
||||||
public static string GenMd5AndAddCache(string fileName, string content)
|
public static string GenMd5AndAddCache(string fileName, string content)
|
||||||
{
|
{
|
||||||
|
content = content.Replace("\r\n", "\n");
|
||||||
var bytes = System.Text.Encoding.UTF8.GetBytes(content);
|
var bytes = System.Text.Encoding.UTF8.GetBytes(content);
|
||||||
var md5 = FileUtil.CalcMD5(bytes);
|
var md5 = FileUtil.CalcMD5(bytes);
|
||||||
CacheManager.Ins.AddCache(fileName, md5, bytes);
|
CacheManager.Ins.AddCache(fileName, md5, bytes);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue