Skip to content

Commit

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

0 comments on commit d84088c

Please sign in to comment.