Skip to content

Commit 82c54d5

Browse files
authored
Code Quality: Fixed a GC hole in OpenClassicPropertiesAction (#16331)
1 parent 0e01986 commit 82c54d5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/Files.App/Actions/Open/OpenClassicPropertiesAction.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,15 @@ private unsafe void ExecuteShellCommand(string itemPath)
5050
SHELLEXECUTEINFOW info = default;
5151
info.cbSize = (uint)Marshal.SizeOf(info);
5252
info.nShow = 5; // SW_SHOW
53-
info.fMask = 0x0000000C;
53+
info.fMask = 0x0000000C; // SEE_MASK_INVOKEIDLIST
5454

55-
var verb = "properties";
56-
fixed (char* cVerb = verb)
55+
fixed (char* cVerb = "properties", lpFile = itemPath)
56+
{
5757
info.lpVerb = cVerb;
58-
59-
fixed (char* lpFile = itemPath)
6058
info.lpFile = lpFile;
6159

62-
PInvoke.ShellExecuteEx(ref info);
60+
PInvoke.ShellExecuteEx(ref info);
61+
}
6362
}
6463

6564
private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)

0 commit comments

Comments
 (0)