diff --git a/websocket-sharp/Server/HttpServer.cs b/websocket-sharp/Server/HttpServer.cs index e04d202c..6e07a473 100644 --- a/websocket-sharp/Server/HttpServer.cs +++ b/websocket-sharp/Server/HttpServer.cs @@ -526,7 +526,7 @@ namespace WebSocketSharp.Server /// public string RootPath { get { - return _rootPath != null && _rootPath.Length > 0 ? _rootPath : (_rootPath = "./Public"); + return _rootPath; } set { @@ -808,6 +808,7 @@ namespace WebSocketSharp.Server String.Format ("http{0}://{1}:{2}/", secure ? "s" : "", _hostname, port)); _log = _listener.Log; + _rootPath = "./Public"; _services = new WebSocketServiceManager (_log); _sync = new object ();