[Modify] Polish it
This commit is contained in:
parent
8488518b4a
commit
12abf61583
@ -402,14 +402,6 @@ namespace WebSocketSharp.Server
|
||||
|
||||
value = value.TrimSlashOrBackslashFromEnd ();
|
||||
|
||||
string full = null;
|
||||
try {
|
||||
full = Path.GetFullPath (value);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
throw new ArgumentException ("An invalid path string.", "value", ex);
|
||||
}
|
||||
|
||||
if (value == "/")
|
||||
throw new ArgumentException ("An absolute root.", "value");
|
||||
|
||||
@ -419,10 +411,20 @@ namespace WebSocketSharp.Server
|
||||
if (value.Length == 2 && value[1] == ':')
|
||||
throw new ArgumentException ("An absolute root.", "value");
|
||||
|
||||
string full = null;
|
||||
|
||||
try {
|
||||
full = Path.GetFullPath (value);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
throw new ArgumentException ("An invalid path string.", "value", ex);
|
||||
}
|
||||
|
||||
if (full == "/")
|
||||
throw new ArgumentException ("An absolute root.", "value");
|
||||
|
||||
full = full.TrimSlashOrBackslashFromEnd ();
|
||||
|
||||
if (full.Length == 2 && full[1] == ':')
|
||||
throw new ArgumentException ("An absolute root.", "value");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user