.
This commit is contained in:
parent
07c5ab9894
commit
208b16cb58
@ -49,7 +49,7 @@ namespace Ryujinx.Common.Utilities
|
|||||||
|
|
||||||
public static string SanitizeFileName(string fileName)
|
public static string SanitizeFileName(string fileName)
|
||||||
{
|
{
|
||||||
var reservedChars = new HashSet<char>(Path.GetInvalidFileNameChars());
|
HashSet<char> reservedChars = [.. Path.GetInvalidFileNameChars()];
|
||||||
return string.Concat(fileName.Select(c => reservedChars.Contains(c) ? '_' : c));
|
return string.Concat(fileName.Select(c => reservedChars.Contains(c) ? '_' : c));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user