Check folder names for '.' and '..'

This commit is contained in:
Ottermandias 2022-08-17 23:00:28 +02:00
parent 5a278d4424
commit 18df989420

View file

@ -144,6 +144,16 @@ public partial class Mod
// and the path must obviously be valid itself.
public static string ReplaceBadXivSymbols( string s, string replacement = "_" )
{
if( s == "." )
{
return replacement;
}
if( s == ".." )
{
return replacement + replacement;
}
StringBuilder sb = new(s.Length);
foreach( var c in s )
{