Bug fix #225 : SaferEnumerateFiles will skip files with UnauthorizedAccessException
This commit is contained in:
parent
962e379642
commit
d6601fed83
5 changed files with 42 additions and 8 deletions
|
|
@ -73,8 +73,8 @@ namespace LibationFileManager
|
|||
protected override string GetFilePathCustom(string productId)
|
||||
{
|
||||
var regex = GetBookSearchRegex(productId);
|
||||
return Directory
|
||||
.EnumerateFiles(DownloadsInProgressDirectory, "*.*", SearchOption.AllDirectories)
|
||||
return FileUtility
|
||||
.SaferEnumerateFiles(DownloadsInProgressDirectory, "*.*", SearchOption.AllDirectories)
|
||||
.FirstOrDefault(s => regex.IsMatch(s));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue