mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-23 04:57:17 +01:00
Simplify a collection initialization expression
This commit is contained in:
@@ -303,11 +303,10 @@ namespace Tgstation.Server.Host.IO
|
||||
/// <inheritdoc />
|
||||
public bool PathContainsParentAccess(string path) => path
|
||||
?.Split(
|
||||
new[]
|
||||
{
|
||||
[
|
||||
Path.DirectorySeparatorChar,
|
||||
Path.AltDirectorySeparatorChar,
|
||||
})
|
||||
])
|
||||
.Any(x => x == "..")
|
||||
?? throw new ArgumentNullException(nameof(path));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user