Skip to content

Commit

Permalink
Fix: Fixed crash with Win32Exception (files-community#12299)
Browse files Browse the repository at this point in the history
  • Loading branch information
hishitetsu committed May 12, 2023
1 parent b66a807 commit 92e07da
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/Files.App/Helpers/FileOperationsHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,12 @@
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;
Expand Down Expand Up @@ -522,7 +512,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());
Expand Down

0 comments on commit 92e07da

Please sign in to comment.