mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 21:57:22 +01:00
Cleaner regex
This doesn't change any valid matches but does remove some unnecessary cruft. Thanks to MegaScience for the second pair of eyes.
This commit is contained in:
parent
92c6a77cf8
commit
f7ec570040
1 changed files with 1 additions and 1 deletions
|
|
@ -410,7 +410,7 @@ namespace MareSynchronos.UI
|
|||
_isPenumbraDirectory = path.ToLower() == _ipcManager.PenumbraModDirectory()?.ToLower();
|
||||
_isDirectoryWritable = IsDirectoryWritable(path);
|
||||
_cacheDirectoryHasOtherFilesThanCache = Directory.GetFiles(path, "*", SearchOption.AllDirectories).Any(f => new FileInfo(f).Name.Length != 40);
|
||||
_cacheDirectoryHasIllegalCharacter = Regex.IsMatch(path, @"^(?:[a-zA-Z]:\\(?:[\w\s\-]|[\\])+?|[\/]{1}(?:[\w\s\-]|[\/])+?)$");
|
||||
_cacheDirectoryHasIllegalCharacter = Regex.IsMatch(path, @"^(?:[a-zA-Z]:\\(?:[\w\s\-\\])+?|\/(?:[\w\s\-]|[\/])+?)$");
|
||||
|
||||
if (!string.IsNullOrEmpty(path)
|
||||
&& Directory.Exists(path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue