mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-07-12 09:18:07 +00:00
MainForm - Fixed renaming folder throwing exception
This commit is contained in:
@@ -749,15 +749,13 @@ namespace PckStudio
|
||||
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
PckFileData test;
|
||||
if (currentPCK.TryGetFile(diag.NewText, (node.Tag as PckFileData).Filetype, out test))
|
||||
{
|
||||
MessageBox.Show($"{diag.NewText} already exists", "File already exists");
|
||||
return;
|
||||
}
|
||||
|
||||
if (node.Tag is PckFileData file)
|
||||
{
|
||||
if (currentPCK.TryGetFile(diag.NewText, file.Filetype, out _))
|
||||
{
|
||||
MessageBox.Show($"{diag.NewText} already exists", "File already exists");
|
||||
return;
|
||||
}
|
||||
file.Filename = diag.NewText;
|
||||
}
|
||||
else // folders
|
||||
|
||||
Reference in New Issue
Block a user