From 2a4ea318218e34a1888ff0d7033f28121cb34f16 Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 13 Jun 2017 15:14:03 +0900 Subject: [PATCH] [Modify] Trim it --- websocket-sharp/Server/HttpServer.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/websocket-sharp/Server/HttpServer.cs b/websocket-sharp/Server/HttpServer.cs index 15a6972a..469cb890 100644 --- a/websocket-sharp/Server/HttpServer.cs +++ b/websocket-sharp/Server/HttpServer.cs @@ -516,8 +516,13 @@ namespace WebSocketSharp.Server /// Gets or sets the path to the document folder of the server. /// /// - /// The set operation does nothing if the server has already - /// started or it is shutting down. + /// + /// '/' or '\' is trimmed from the end of the value if any. + /// + /// + /// The set operation does nothing if the server has already + /// started or it is shutting down. + /// /// /// /// @@ -558,7 +563,7 @@ namespace WebSocketSharp.Server return; } - _rootPath = value; + _rootPath = value.TrimSlashOrBackslashFromEnd (); } } }