mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-14 00:12:33 +00:00
Update MainForm.checkForPassword to use TryGetFile
This commit is contained in:
@@ -124,9 +124,8 @@ namespace PckStudio
|
||||
|
||||
private bool checkForPassword()
|
||||
{
|
||||
if (currentPCK.HasFile("0", 4))
|
||||
if (currentPCK.TryGetFile("0", 4, out PCKFile.FileData file))
|
||||
{
|
||||
var file = currentPCK.GetFile("0", 4);
|
||||
if (file.properties.HasProperty("LOCK"))
|
||||
return new pckLocked(file.properties.GetProperty("LOCK").Item2).ShowDialog() == DialogResult.OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user