From 19d74f7ba7911a718c811f505a46d6de1cc5d70a Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Sat, 24 Apr 2021 18:28:19 +0800 Subject: [PATCH] MySql bluk copy linux bug --- .../SqlSugar/Realization/MySql/SqlBuilder/MySqlBlueCopy.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlBlueCopy.cs b/Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlBlueCopy.cs index fbae11623..0bc9e293b 100644 --- a/Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlBlueCopy.cs +++ b/Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlBlueCopy.cs @@ -66,13 +66,13 @@ namespace SqlSugar }); dt.Rows.Add(row); } - var dllPath = AppDomain.CurrentDomain.BaseDirectory + "failFiles"; + var dllPath =Path.Combine(AppDomain.CurrentDomain.BaseDirectory , "failFiles"); DirectoryInfo dir = new DirectoryInfo(dllPath); if (!dir.Exists) { dir.Create(); } - var fileName = dllPath + "\\" + Guid.NewGuid().ToString() + ".csv"; + var fileName =Path.Combine( dllPath , Guid.NewGuid().ToString() + ".csv"); var dataTableToCsv = DataTableToCsvString(dt); File.WriteAllText(fileName, dataTableToCsv, new UTF8Encoding(false)); MySqlConnection conn = this.Context.Ado.Connection as MySqlConnection;