[Modify] Polish it
This commit is contained in:
parent
989819844f
commit
d64ea66209
@ -839,18 +839,13 @@ namespace WebSocketSharp.Server
|
|||||||
: address.ToString ();
|
: address.ToString ();
|
||||||
}
|
}
|
||||||
|
|
||||||
private string createFilePath (string path)
|
private string createFilePath (string childPath)
|
||||||
{
|
{
|
||||||
var parent = _rootPath;
|
childPath = childPath.TrimStart ('/', '\\');
|
||||||
var child = path.TrimStart ('/', '\\');
|
return new StringBuilder (_rootPath, 32)
|
||||||
|
.AppendFormat ("/{0}", childPath)
|
||||||
var buff = new StringBuilder (parent, 32);
|
.ToString ()
|
||||||
if (parent == "/" || parent == "\\")
|
.Replace ('\\', '/');
|
||||||
buff.Append (child);
|
|
||||||
else
|
|
||||||
buff.AppendFormat ("/{0}", child);
|
|
||||||
|
|
||||||
return buff.ToString ().Replace ('\\', '/');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string getHost (Uri uri)
|
private static string getHost (Uri uri)
|
||||||
|
Loading…
Reference in New Issue
Block a user