From bf1af86387804c774198e2ef4d6d737d035eacf7 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期二, 21 三月 2023 16:41:52 +0800
Subject: [PATCH] 1

---
 ExportMap/cs/SGUtils.cs                    |    5 ++++-
 ExportMap/cs/Tools.cs                      |    2 +-
 ExportMap/Controllers/ConvertController.cs |    6 +++---
 ExportMap/Controllers/ExportController.cs  |    2 +-
 ExportMap/cs/ConvertUtils.cs               |    2 +-
 5 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/ExportMap/Controllers/ConvertController.cs b/ExportMap/Controllers/ConvertController.cs
index ddbf285..28c8d48 100644
--- a/ExportMap/Controllers/ConvertController.cs
+++ b/ExportMap/Controllers/ConvertController.cs
@@ -42,7 +42,7 @@
             }
             catch (Exception ex)
             {
-                LogOut.Error(ex.StackTrace);
+                LogOut.Error(ex.Message + "\r\n" + ex.StackTrace);
                 return ResponseMsg<string>.fail(ex.Message);
             }
         }
@@ -83,7 +83,7 @@
             }
             catch (Exception ex)
             {
-                LogOut.Error(ex.StackTrace);
+                LogOut.Error(ex.Message + "\r\n" + ex.StackTrace);
                 return ResponseMsg<string>.fail(ex.Message);
             }
         }
@@ -122,7 +122,7 @@
             }
             catch (Exception ex)
             {
-                LogOut.Error(ex.StackTrace);
+                LogOut.Error(ex.Message + "\r\n" + ex.StackTrace);
                 return ResponseMsg<string>.fail(ex.Message);
             }
         }
diff --git a/ExportMap/Controllers/ExportController.cs b/ExportMap/Controllers/ExportController.cs
index b7a3254..fef2316 100644
--- a/ExportMap/Controllers/ExportController.cs
+++ b/ExportMap/Controllers/ExportController.cs
@@ -40,7 +40,7 @@
             }
             catch (Exception ex)
             {
-                LogOut.Error(ex.StackTrace);
+                LogOut.Error(ex.Message + "\r\n" + ex.StackTrace);
                 return ResponseMsg<string>.fail(ex.Message);
             }
         }
diff --git a/ExportMap/cs/ConvertUtils.cs b/ExportMap/cs/ConvertUtils.cs
index 36a8d76..0a092d0 100644
--- a/ExportMap/cs/ConvertUtils.cs
+++ b/ExportMap/cs/ConvertUtils.cs
@@ -96,7 +96,7 @@
             }
             catch (Exception ex)
             {
-                LogOut.Error(ex.StackTrace);
+                LogOut.Error(ex.Message + "\r\n" + ex.StackTrace);
             }
             finally
             {
diff --git a/ExportMap/cs/SGUtils.cs b/ExportMap/cs/SGUtils.cs
index fbe3c59..46cf5c9 100644
--- a/ExportMap/cs/SGUtils.cs
+++ b/ExportMap/cs/SGUtils.cs
@@ -219,7 +219,10 @@
                 if (meta.path.IndexOf("SG\\") > -1) continue;
 
                 string source = Path.Combine(uploadFolder, meta.path);
-                File.Move(source, Path.Combine(sgFolder, meta.id + "_" + meta.name));
+                string target = Path.Combine(sgFolder, meta.id + "_" + meta.name);
+
+                if (File.Exists(target)) File.Delete(target);
+                File.Move(source, target);
 
                 if ("mpt".Equals(meta.type))
                 {
diff --git a/ExportMap/cs/Tools.cs b/ExportMap/cs/Tools.cs
index 30c2e17..9155e38 100644
--- a/ExportMap/cs/Tools.cs
+++ b/ExportMap/cs/Tools.cs
@@ -221,7 +221,7 @@
             }
             catch (Exception ex)
             {
-                LogOut.Error(ex.StackTrace);
+                LogOut.Error(ex.Message + "\r\n" + ex.StackTrace);
                 str = ex.Message;
             }
 

--
Gitblit v1.9.3