diff --git a/src/Files.App/Helpers/FileOperationsHelpers.cs b/src/Files.App/Helpers/FileOperationsHelpers.cs index 784ad00870e9..6ec7d6dc3cb5 100644 --- a/src/Files.App/Helpers/FileOperationsHelpers.cs +++ b/src/Files.App/Helpers/FileOperationsHelpers.cs @@ -1,26 +1,15 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using Files.App.Filesystem; using Files.App.Filesystem.Security; using Files.App.Shell; using Files.Backend.Helpers; -using Files.Shared; -using Files.Shared.Enums; -using Files.Shared.Extensions; using Microsoft.Extensions.Logging; using Microsoft.Win32; -using System; using System.Collections.Concurrent; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.IO; -using System.Linq; using System.Runtime.InteropServices; using System.Security.Principal; -using System.Threading; -using System.Threading.Tasks; using Tulpep.ActiveDirectoryObjectPicker; using Vanara.PInvoke; using Vanara.Windows.Shell; @@ -525,7 +514,7 @@ public static void TryCancelOperation(string operationId) { Name = x.ProcessName, Pid = x.Id, - FileName = x.MainModule?.FileName, + FileName = SafetyExtensions.IgnoreExceptions(() => x.MainModule?.FileName), AppName = SafetyExtensions.IgnoreExceptions(() => x.MainModule?.FileVersionInfo?.FileDescription) }).ToList(); processes.ForEach(x => x.Dispose());