mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-29 10:24:34 +00:00
Fixed weird exception with the replace file dialog
This commit is contained in:
@@ -591,7 +591,8 @@ namespace PckStudio
|
||||
if (treeViewMain.SelectedNode.Tag is PCKFile.FileData file)
|
||||
{
|
||||
using var ofd = new OpenFileDialog();
|
||||
ofd.Filter = Path.GetExtension(file.filepath);
|
||||
// Suddenly, and randomly, this started throwing an exception because it wasn't formatted correctly? So now it's formatted correctly and now displays the file type name in the dialog.
|
||||
ofd.Filter = file.filetype.ToString() + " (*" + Path.GetExtension(file.filepath) + ")|*" + Path.GetExtension(file.filepath);
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
file.SetData(File.ReadAllBytes(ofd.FileName));
|
||||
|
||||
Reference in New Issue
Block a user