[Modify] Polish it
This commit is contained in:
parent
e1c1775c25
commit
48f0087fb3
@ -127,14 +127,10 @@ namespace WebSocketSharp.Server
|
|||||||
private string createFilePath (string childPath)
|
private string createFilePath (string childPath)
|
||||||
{
|
{
|
||||||
childPath = childPath.TrimStart ('/', '\\');
|
childPath = childPath.TrimStart ('/', '\\');
|
||||||
|
return new StringBuilder (_docRootPath, 32)
|
||||||
var buff = new StringBuilder (_docRootPath, 32);
|
.AppendFormat ("/{0}", childPath)
|
||||||
if (_docRootPath == "/" || _docRootPath == "\\")
|
.ToString ()
|
||||||
buff.Append (childPath);
|
.Replace ('\\', '/');
|
||||||
else
|
|
||||||
buff.AppendFormat ("/{0}", childPath);
|
|
||||||
|
|
||||||
return buff.ToString ().Replace ('\\', '/');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool tryReadFile (string path, out byte[] contents)
|
private static bool tryReadFile (string path, out byte[] contents)
|
||||||
|
Loading…
Reference in New Issue
Block a user