Skip to content

Commit

Permalink
Feature: Added support for opening and extracting mrpack files (#14942)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaira2 committed Mar 11, 2024
1 parent cc4a224 commit 3a2a6e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Files.App (Package)/Package.appxmanifest
Expand Up @@ -142,6 +142,7 @@
<uap:FileType>.rar</uap:FileType>
<uap:FileType>.tar</uap:FileType>
<uap:FileType>.jar</uap:FileType>
<uap:FileType>.mrpack</uap:FileType>
</uap:SupportedFileTypes>
<uap:Logo>assets\archives\ExtensionIcon.png</uap:Logo>
</uap:FileTypeAssociation>
Expand Down
4 changes: 2 additions & 2 deletions src/Files.Shared/Helpers/FileExtensionHelpers.cs
Expand Up @@ -72,7 +72,7 @@ public static bool IsPowerShellFile(string fileExtensionToCheck)
/// <returns><c>true</c> if the fileExtensionToCheck is a zip bundle file; otherwise, <c>false</c>.</returns>
public static bool IsZipFile(string? fileExtensionToCheck)
{
return HasExtension(fileExtensionToCheck, ".zip", ".msix", ".appx", ".msixbundle", ".appxbundle", ".7z", ".rar", ".tar", ".mcpack", ".mcworld", ".jar", ".gz", ".lzh");
return HasExtension(fileExtensionToCheck, ".zip", ".msix", ".appx", ".msixbundle", ".appxbundle", ".7z", ".rar", ".tar", ".mcpack", ".mcworld", ".mrpack", ".jar", ".gz", ".lzh");
}

public static bool IsBrowsableZipFile(string? filePath, out string? ext)
Expand All @@ -85,7 +85,7 @@ public static bool IsBrowsableZipFile(string? filePath, out string? ext)
}

// Only extensions we want to browse
ext = new[] { ".zip", ".7z", ".rar", ".tar", ".gz", ".lzh", ".jar" }
ext = new[] { ".zip", ".7z", ".rar", ".tar", ".gz", ".lzh", ".mrpack", ".jar" }
.FirstOrDefault(x => filePath.Contains(x, StringComparison.OrdinalIgnoreCase));

return ext is not null;
Expand Down

0 comments on commit 3a2a6e4

Please sign in to comment.