RemoteItemMover, Startup/Exit handler refactor

This commit is contained in:
2023-07-26 13:51:17 +02:00
parent 3de71cbdbe
commit 0b36fb939c
23 changed files with 210 additions and 110 deletions

View File

@@ -44,12 +44,12 @@ public class LocalItemDeleter : IItemDeleter<ILocalContentProvider>
throw new FileNotFoundException(nativePath);
}
}
catch (Exception e)
catch (Exception ex)
{
_logger.LogDebug(e, "Failed to delete item with path {Path}", nativePath);
_logger.LogDebug(ex, "Failed to delete item with path {Path}", nativePath);
if (!_adminContentAccessorFactory.IsAdminModeSupported
|| e is not UnauthorizedAccessException and not IOException)
|| ex is not UnauthorizedAccessException and not IOException)
{
_logger.LogTrace(
"Admin mode is disabled or exception is not an access denied one, not trying to create {Path} as admin",