【优化】 包含~和$字符的文件变化不会触发MultiFileWatcher的事件。避免excel关闭时触发生成。
parent
dd4368faf9
commit
80074057f8
|
|
@ -63,7 +63,10 @@ namespace Luban.Client.Utils
|
||||||
private void OnChange(object sender, FileSystemEventArgs e)
|
private void OnChange(object sender, FileSystemEventArgs e)
|
||||||
{
|
{
|
||||||
var dirtyName = e.Name;
|
var dirtyName = e.Name;
|
||||||
if (string.IsNullOrWhiteSpace(dirtyName) || !_filterSuffixs.Any(s => dirtyName.EndsWith(s)))
|
if (string.IsNullOrWhiteSpace(dirtyName)
|
||||||
|
|| !_filterSuffixs.Any(s => dirtyName.EndsWith(s))
|
||||||
|
|| dirtyName.Contains('~')
|
||||||
|
|| dirtyName.Contains('$'))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue