@@ -752,7 +752,7 @@ await Task.Run(async () =>
752
752
{
753
753
await loadExtendedPropsSemaphore . WaitAsync ( loadPropsCTS . Token ) ;
754
754
}
755
- catch ( Exception ex ) when ( ex is OperationCanceledException || ex is ObjectDisposedException )
755
+ catch ( OperationCanceledException )
756
756
{
757
757
return ;
758
758
}
@@ -911,7 +911,7 @@ public async void RapidAddItemsToCollectionAsync(string path, string previousDir
911
911
// simply drop this instance
912
912
await enumFolderSemaphore . WaitAsync ( semaphoreCTS . Token ) ;
913
913
}
914
- catch ( Exception ex ) when ( ex is OperationCanceledException || ex is ObjectDisposedException )
914
+ catch ( OperationCanceledException )
915
915
{
916
916
return ;
917
917
}
@@ -1077,10 +1077,6 @@ await folders.AsyncParallelForEach(async (folder) =>
1077
1077
}
1078
1078
}
1079
1079
}
1080
- catch ( ObjectDisposedException ex )
1081
- {
1082
- NLog . LogManager . GetCurrentClassLogger ( ) . Warn ( ex , ex . Message ) ;
1083
- }
1084
1080
finally
1085
1081
{
1086
1082
enumFolderSemaphore . Release ( ) ;
@@ -1831,7 +1827,7 @@ private async Task UpdateFileOrFolderAsync(string path)
1831
1827
{
1832
1828
await enumFolderSemaphore . WaitAsync ( semaphoreCTS . Token ) ;
1833
1829
}
1834
- catch ( Exception ex ) when ( ex is OperationCanceledException || ex is ObjectDisposedException )
1830
+ catch ( OperationCanceledException )
1835
1831
{
1836
1832
return ;
1837
1833
}
@@ -1876,7 +1872,7 @@ public async Task RemoveFileOrFolderAsync(string path)
1876
1872
{
1877
1873
await enumFolderSemaphore . WaitAsync ( semaphoreCTS . Token ) ;
1878
1874
}
1879
- catch ( Exception ex ) when ( ex is OperationCanceledException || ex is ObjectDisposedException )
1875
+ catch ( OperationCanceledException )
1880
1876
{
1881
1877
return ;
1882
1878
}
0 commit comments