From 56bf39cf6061d28c041ed725aa149c4f0934fa81 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 23 Dec 2023 14:32:09 +0800 Subject: [PATCH] =?UTF-8?q?copy=E6=97=B6=E8=A6=86=E7=9B=96=E5=8E=9F?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/LawyerArchivesController.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/24Hour/Controllers/Common/LawyerArchivesController.cs b/24Hour/Controllers/Common/LawyerArchivesController.cs index 860c297..676cd57 100644 --- a/24Hour/Controllers/Common/LawyerArchivesController.cs +++ b/24Hour/Controllers/Common/LawyerArchivesController.cs @@ -2008,7 +2008,7 @@ namespace _24Hour.Controllers.Common if (System.IO.File.Exists(filepath)) { var targetfile = Path.Combine(annecdir, Path.GetFileName(filepath)); - System.IO.File.Copy(filepath, targetfile); + System.IO.File.Copy(filepath, targetfile,true); } } @@ -2023,7 +2023,7 @@ namespace _24Hour.Controllers.Common if (System.IO.File.Exists(filepath)) { var targetfile = Path.Combine(legalAidPhotoDir, Path.GetFileName(filepath)); - System.IO.File.Copy(filepath, targetfile); + System.IO.File.Copy(filepath, targetfile,true); } } @@ -2037,7 +2037,7 @@ namespace _24Hour.Controllers.Common if (System.IO.File.Exists(filepath)) { var targetfile = Path.Combine(legalAidPhotoDir, Path.GetFileName(filepath)); - System.IO.File.Copy(filepath, targetfile); + System.IO.File.Copy(filepath, targetfile,true); } } var otherPhotos = item.otherPhoto.ConvertToModel>() ?? new List(); @@ -2049,7 +2049,7 @@ namespace _24Hour.Controllers.Common if (System.IO.File.Exists(filepath)) { var targetfile = Path.Combine(legalAidPhotoDir, Path.GetFileName(filepath)); - System.IO.File.Copy(filepath, targetfile); + System.IO.File.Copy(filepath, targetfile,true); } } @@ -2069,7 +2069,7 @@ namespace _24Hour.Controllers.Common var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + file.Replace("/", @"\"); if (System.IO.File.Exists(filepath)) { - System.IO.File.Copy(filepath, Path.Combine(cardidDir, Path.GetFileName(filepath))); + System.IO.File.Copy(filepath, Path.Combine(cardidDir, Path.GetFileName(filepath)),true); } } //保存工作证图片 律师职业证书 @@ -2081,7 +2081,7 @@ namespace _24Hour.Controllers.Common var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + file.Replace("/", @"\"); if (System.IO.File.Exists(filepath)) { - System.IO.File.Copy(filepath, Path.Combine(identityphotosDir, Path.GetFileName(filepath))); + System.IO.File.Copy(filepath, Path.Combine(identityphotosDir, Path.GetFileName(filepath)),true); } } @@ -2093,7 +2093,7 @@ namespace _24Hour.Controllers.Common var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + file.Replace("/", @"\"); if (System.IO.File.Exists(filepath)) { - System.IO.File.Copy(filepath, Path.Combine(departmentPhotosDir, Path.GetFileName(filepath))); + System.IO.File.Copy(filepath, Path.Combine(departmentPhotosDir, Path.GetFileName(filepath)),true); } } } @@ -2104,7 +2104,7 @@ namespace _24Hour.Controllers.Common FileInfo fi = new FileInfo(packegzipname); //xx/xx/aa.rar var akspath = System.IO.Path.ChangeExtension(packegzipname, ".aks"); - fi.MoveTo(akspath); //xx/xx/xx.rar + fi.MoveTo(akspath,true); //xx/xx/xx.rar result.result = $"/temp/{packegdirname}.aks"; result.IsSucceed = true;