From 2e10a71dcdcbd72434ecdfb7424a482c38b111de Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 24 Apr 2015 22:08:15 +0200 Subject: [PATCH] Fix extracting files from Wii discs I broke it for individual files but not folders in 4.0-6016. --- Source/Core/DolphinWX/ISOProperties.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/ISOProperties.cpp b/Source/Core/DolphinWX/ISOProperties.cpp index 4d08a5b008..f2ef327c10 100644 --- a/Source/Core/DolphinWX/ISOProperties.cpp +++ b/Source/Core/DolphinWX/ISOProperties.cpp @@ -755,7 +755,10 @@ void CISOProperties::OnExtractFile(wxCommandEvent& WXUNUSED (event)) if (OpenISO->IsWiiDisc()) { - WiiPartition* partition = reinterpret_cast(m_Treectrl->GetItemData(m_Treectrl->GetSelection())); + const wxTreeItemId tree_selection = m_Treectrl->GetSelection(); + WiiPartition* partition = reinterpret_cast(m_Treectrl->GetItemData(tree_selection)); + File.erase(0, m_Treectrl->GetItemText(tree_selection).length() + 1); // Remove "Partition x/" + partition->FileSystem->ExportFile(WxStrToStr(File), WxStrToStr(Path)); } else @@ -897,8 +900,10 @@ void CISOProperties::OnExtractDir(wxCommandEvent& event) if (OpenISO->IsWiiDisc()) { - WiiPartition* partition = reinterpret_cast(m_Treectrl->GetItemData(m_Treectrl->GetSelection())); - Directory.erase(0, m_Treectrl->GetItemText(m_Treectrl->GetSelection()).length() + 1); // Remove "Partition x/" + const wxTreeItemId tree_selection = m_Treectrl->GetSelection(); + WiiPartition* partition = reinterpret_cast(m_Treectrl->GetItemData(tree_selection)); + Directory.erase(0, m_Treectrl->GetItemText(tree_selection).length() + 1); // Remove "Partition x/" + ExportDir(WxStrToStr(Directory), WxStrToStr(Path), partition); } else