MainForm - Fix clone function working on folders

This commit is contained in:
miku-666
2024-03-23 18:21:53 +01:00
parent e980aeeae9
commit 20a97bafb4

View File

@@ -1170,7 +1170,8 @@ namespace PckStudio
private void cloneFileToolStripMenuItem_Click(object sender, EventArgs e)
{
TreeNode node = treeViewMain.SelectedNode;
if (node == null) return;
if (node == null || !node.IsTagOfType<PckFileData>())
return;
string path = node.FullPath;
using TextPrompt diag = new TextPrompt(node.Tag is null ? Path.GetFileName(node.FullPath) : node.FullPath);