This is an automated email from the ASF dual-hosted git repository.

gaohan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shenyu-client-dotnet.git


The following commit(s) were added to refs/heads/main by this push:
     new e13eff1  [feat]:fix path like "path01\\path02"  special in system (#33)
e13eff1 is described below

commit e13eff1263344254361d479ad22c7d258f66b338
Author: bingtianyiyan <[email protected]>
AuthorDate: Fri Aug 12 16:41:59 2022 +0800

    [feat]:fix path like "path01\\path02"  special in system (#33)
---
 client/Apache.ShenYu.AspNetCore/Services/ShenyuStartupService.cs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/client/Apache.ShenYu.AspNetCore/Services/ShenyuStartupService.cs 
b/client/Apache.ShenYu.AspNetCore/Services/ShenyuStartupService.cs
index f785af8..6ad5cc8 100644
--- a/client/Apache.ShenYu.AspNetCore/Services/ShenyuStartupService.cs
+++ b/client/Apache.ShenYu.AspNetCore/Services/ShenyuStartupService.cs
@@ -132,6 +132,10 @@ namespace Apache.ShenYu.AspNetCore.Services
                                 var path = this.GetPath(methodShenyuAttr, 
methodRouteAttr);
 
                                 var wholePath = path == null ? basePath : 
Path.Combine("/", basePath, path);
+                                //fix if wholePath like "path01\\path02"
+                                if(wholePath != null && 
wholePath.Contains("\\")){
+                                    wholePath = wholePath.Replace("\\", "/");
+                                }
 
                                 await 
this._shenyuRegister.PersistInterface(this.BuildMetadataDto(wholePath, 
address));
                             }
@@ -208,4 +212,4 @@ namespace Apache.ShenYu.AspNetCore.Services
             return shenyuClientAttribute != null ? shenyuClientAttribute.Path 
: routePath;
         }
     }
-}
\ No newline at end of file
+}

Reply via email to