/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Actions/Content/Run/RunAsAnotherUserAction.cs
34 строки
1 KB
yair100
Fix: Fixed issue where no error was displayed when opening corrupted exe (#18721)
15 июл 2026, 23:06
Не верифицирован
15 июл 2026, 23:06
8674d76
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. using Files.Shared.Helpers; namespace Files.App.Actions { [GeneratedRichCommand] internal sealed partial class RunAsAnotherUserAction : BaseRunAsAction { private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService<IContentPageContext>(); public override string Label => Strings.BaseLayoutContextFlyoutRunAsAnotherUserText.GetLocalizedResource(); public override string Description => Strings.RunAsAnotherUserDescription.GetLocalizedResource(); public override RichGlyph Glyph => new("\uE7EE"); public override bool IsExecutable => ContentPageContext.SelectedItem is not null && ContentPageContext.PageType != ContentPageTypes.RecycleBin && ContentPageContext.PageType != ContentPageTypes.ZipFolder && !FileExtensionHelpers.IsAhkFile(ContentPageContext.SelectedItem.FileExtension) && (FileExtensionHelpers.IsExecutableFile(ContentPageContext.SelectedItem.FileExtension) || (ContentPageContext.SelectedItem is IShortcutItem shortcut && shortcut.IsExecutable)); public RunAsAnotherUserAction() : base("runasuser") { } } }