Browse Source

兼容linux系统下不支持反斜杠路径分隔符

就是那个代码狗 3 years ago
parent
commit
837d31d4fb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs

+ 1 - 1
Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs

@@ -401,7 +401,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
     /// <returns></returns>
     private static List<string> GetTemplatePathList()
     {
-        var templatePath = App.WebHostEnvironment.WebRootPath + @"\Template\";
+        var templatePath = Path.Combine(App.WebHostEnvironment.WebRootPath, "Template");
         return new List<string>()
         {
             Path.Combine(templatePath , "Service.cs.vm"),