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:
MattNL
2026-01-25 14:07:00 -05:00
parent a6c8d330c8
commit 6e3b88aa18
2 changed files with 3 additions and 3 deletions

View File

@@ -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;

View File

@@ -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();