adjust cache directory regex
This commit is contained in:
@@ -410,7 +410,7 @@ namespace MareSynchronos.UI
|
|||||||
_isPenumbraDirectory = path.ToLower() == _ipcManager.PenumbraModDirectory()?.ToLower();
|
_isPenumbraDirectory = path.ToLower() == _ipcManager.PenumbraModDirectory()?.ToLower();
|
||||||
_isDirectoryWritable = IsDirectoryWritable(path);
|
_isDirectoryWritable = IsDirectoryWritable(path);
|
||||||
_cacheDirectoryHasOtherFilesThanCache = Directory.GetFiles(path, "*", SearchOption.AllDirectories).Any(f => new FileInfo(f).Name.Length != 40);
|
_cacheDirectoryHasOtherFilesThanCache = Directory.GetFiles(path, "*", SearchOption.AllDirectories).Any(f => new FileInfo(f).Name.Length != 40);
|
||||||
_cacheDirectoryHasIllegalCharacter = Regex.IsMatch(path, @"^(\w:\\(\w|\\)*|\/(\w|\/)*)");
|
_cacheDirectoryHasIllegalCharacter = Regex.IsMatch(path, @"^(\w:\\(\w|\\| |-|_)*|\/(\w|\/| |-|_)*)");
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(path)
|
if (!string.IsNullOrEmpty(path)
|
||||||
&& Directory.Exists(path)
|
&& Directory.Exists(path)
|
||||||
|
|||||||
Reference in New Issue
Block a user