Formatting

This commit is contained in:
Ronan Charles-Lorel 2023-01-31 15:47:47 +01:00 committed by GitHub
parent a2ac791bb7
commit 31ac861b85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,8 +294,8 @@ namespace Emby.Server.Implementations.IO
/// <exception cref="ArgumentNullException">The filename is null.</exception> /// <exception cref="ArgumentNullException">The filename is null.</exception>
public string GetValidFilename(string filename) public string GetValidFilename(string filename)
{ {
//necessary because (as per the doc) GetInvalidFileNameChars is not exhaustive and may not return all invalid chars, which creates issues // necessary because (as per the doc) GetInvalidFileNameChars is not exhaustive and may not return all invalid chars, which creates issues
char[] genericInvalidChars = {':'}; char[] genericInvalidChars = { ':' };
var invalid = Path.GetInvalidFileNameChars().Concat(genericInvalidChars).ToArray(); var invalid = Path.GetInvalidFileNameChars().Concat(genericInvalidChars).ToArray();
var first = filename.IndexOfAny(invalid); var first = filename.IndexOfAny(invalid);
if (first == -1) if (first == -1)