Skip to content

Commit

Permalink
Merge branch 'main' into 12390_DisableDragAndDropWhenAdmin
Browse files Browse the repository at this point in the history
  • Loading branch information
QuaintMako authored Aug 6, 2023
2 parents 825cdf9 + 65b2519 commit c5123be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Files.App/Actions/Content/Run/RunAsAdminAction.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.App.Utils.Shell;

namespace Files.App.Actions
{
internal class RunAsAdminAction : ObservableObject, IAction
Expand All @@ -20,7 +18,9 @@ public RichGlyph Glyph

public bool IsExecutable =>
context.SelectedItem is not null &&
FileExtensionHelpers.IsExecutableFile(context.SelectedItem.FileExtension);
(FileExtensionHelpers.IsExecutableFile(context.SelectedItem.FileExtension) ||
(context.SelectedItem is ShortcutItem shortcut &&
shortcut.IsExecutable));

public RunAsAdminAction()
{
Expand Down
6 changes: 3 additions & 3 deletions src/Files.App/Actions/Content/Run/RunAsAnotherUserAction.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.App.Utils.Shell;

namespace Files.App.Actions
{
internal class RunAsAnotherUserAction : ObservableObject, IAction
Expand All @@ -11,7 +9,9 @@ internal class RunAsAnotherUserAction : ObservableObject, IAction

public bool IsExecutable =>
context.SelectedItem is not null &&
FileExtensionHelpers.IsExecutableFile(context.SelectedItem.FileExtension);
(FileExtensionHelpers.IsExecutableFile(context.SelectedItem.FileExtension) ||
(context.SelectedItem is ShortcutItem shortcut &&
shortcut.IsExecutable));

public string Label
=> "BaseLayoutContextFlyoutRunAsAnotherUser/Text".GetLocalizedResource();
Expand Down

0 comments on commit c5123be

Please sign in to comment.