mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-04 15:15:01 +00:00
Removed restriction on file extension
LCE technically allows for any file to be opened regardless of file extension as long as it is a valid PCK file. Removing this allows advanced users to be creative with pack stylization
This commit is contained in:
@@ -86,7 +86,7 @@ namespace PckStudio
|
||||
|
||||
private bool TryOpenPck(string filepath, out PackInfo packInfo)
|
||||
{
|
||||
if (!File.Exists(filepath) || !filepath.EndsWith(".pck"))
|
||||
if (!File.Exists(filepath))
|
||||
{
|
||||
packInfo = PackInfo.Empty;
|
||||
return false;
|
||||
@@ -127,7 +127,7 @@ namespace PckStudio
|
||||
|
||||
private void AddEditorPage(string filepath)
|
||||
{
|
||||
if (!File.Exists(filepath) && !filepath.EndsWith(".pck"))
|
||||
if (!File.Exists(filepath))
|
||||
{
|
||||
Trace.TraceError($"[{nameof(AddEditorPage)}] Invalid filepath({filepath})");
|
||||
return;
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace PckStudio
|
||||
Updater.SetOwner(MainInstance);
|
||||
if (args.Length > 0)
|
||||
{
|
||||
MainInstance.LoadPckFromFile(args.Where(arg => File.Exists(arg) && arg.EndsWith(".pck")));
|
||||
MainInstance.LoadPckFromFile(args.Where(arg => File.Exists(arg)));
|
||||
}
|
||||
Application.ApplicationExit += (sender, e) => { RPC.Deinitialize(); };
|
||||
MainInstance.FocusMe();
|
||||
|
||||
Reference in New Issue
Block a user