Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Files.App/Data/Items/ListedItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ public override string Name
public SHOW_WINDOW_CMD ShowWindowCommand { get; set; }
public bool IsUrl { get; set; }
public bool IsSymLink { get; set; }
public override bool IsScriptFile => FileExtensionHelpers.IsScriptFile(TargetPath);
public override bool IsExecutable => FileExtensionHelpers.IsExecutableFile(TargetPath, true);
}

Expand Down Expand Up @@ -786,6 +787,7 @@ public override string Name
public SHOW_WINDOW_CMD ShowWindowCommand { get; set; }
public bool IsUrl { get; set; }
public bool IsSymLink { get; set; }
public override bool IsScriptFile => FileExtensionHelpers.IsScriptFile(TargetPath);
public override bool IsExecutable => FileExtensionHelpers.IsExecutableFile(TargetPath, true);
}
public interface IGitItem : IListedItem
Expand Down
2 changes: 1 addition & 1 deletion src/Files.Shared/Helpers/FileExtensionHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public static bool IsCertificateFile(string? filePathToCheck)
/// <returns><c>true</c> if the filePathToCheck is a script file; otherwise, <c>false</c>.</returns>
public static bool IsScriptFile(string? filePathToCheck)
{
return HasExtension(filePathToCheck, ".py", ".ahk");
return HasExtension(filePathToCheck, ".py", ".ahk", ".bat", ".cmd", ".ps1");
}

/// <summary>
Expand Down
Loading