From 6e3b88aa18b1091c75e033236e4f7369f471c5cc Mon Sep 17 00:00:00 2001 From: MattNL Date: Sun, 25 Jan 2026 14:07:00 -0500 Subject: [PATCH] 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 --- PCK-Studio/MainForm.cs | 4 ++-- PCK-Studio/Program.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs index 760c5c96..4508f1c4 100644 --- a/PCK-Studio/MainForm.cs +++ b/PCK-Studio/MainForm.cs @@ -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; diff --git a/PCK-Studio/Program.cs b/PCK-Studio/Program.cs index 5d11a7d5..3aa66369 100644 --- a/PCK-Studio/Program.cs +++ b/PCK-Studio/Program.cs @@ -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();