add penumbra ipc for pathchanges, change all tolower to tolowerinvariant

This commit is contained in:
Stanley Dimant
2022-08-13 21:16:05 +02:00
parent deb76f42a4
commit 4226f2e16d
6 changed files with 21 additions and 13 deletions

View File

@@ -273,8 +273,8 @@ namespace MareSynchronos.UI
{
if (_characterOrCommentFilter.IsNullOrEmpty()) return true;
_configuration.GetCurrentServerUidComments().TryGetValue(p.OtherUID, out var comment);
return p.OtherUID.ToLower().Contains(_characterOrCommentFilter.ToLower()) ||
(comment?.ToLower().Contains(_characterOrCommentFilter.ToLower()) ?? false);
return p.OtherUID.ToLowerInvariant().Contains(_characterOrCommentFilter.ToLowerInvariant()) ||
(comment?.ToLowerInvariant().Contains(_characterOrCommentFilter.ToLowerInvariant()) ?? false);
});
if (_configuration.ReverseUserSort) users = users.Reverse();

View File

@@ -424,7 +424,7 @@ namespace MareSynchronos.UI
{
if (!success) return;
_isPenumbraDirectory = path.ToLower() == _ipcManager.PenumbraModDirectory()?.ToLower();
_isPenumbraDirectory = path.ToLowerInvariant() == _ipcManager.PenumbraModDirectory()?.ToLowerInvariant();
_isDirectoryWritable = IsDirectoryWritable(path);
_cacheDirectoryHasOtherFilesThanCache = Directory.GetFiles(path, "*", SearchOption.AllDirectories).Any(f => new FileInfo(f).Name.Length != 40);
_cacheDirectoryIsValidPath = Regex.IsMatch(path, @"^(?:[a-zA-Z]:\\[\w\s\-\\]+?|\/(?:[\w\s\-\/])+?)$", RegexOptions.ECMAScript);