diff options
| author | JosJuice <josjuice@gmail.com> | 2015-07-30 15:06:23 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2017-06-13 22:40:57 +0200 |
| commit | 7c45afecb2a157088591a94f8c008d74419243d1 (patch) | |
| tree | 316f66a222d175f687d5c75696c9a98c3b53053e /Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp | |
| parent | 3d5ef948d0d3984e4ef7c26fe56acf469868e0f3 (diff) | |
Filesystem: Use file info in arguments instead of path
Some callers already have the file info, making the relatively slow
FindFileInfo calls unnecessary. Callers that didn't have the file info
will now need to call FindFileInfo on their own.
Diffstat (limited to 'Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp b/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp index ebad7364ef..cb4e3fd059 100644 --- a/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp +++ b/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp @@ -405,12 +405,14 @@ void FilesystemPanel::ExtractSingleFile(const wxString& output_file_path) const // Remove "Partition x/" selection_file_path.erase(0, slash_index + 1); - partition->filesystem->ExportFile(WxStrToStr(selection_file_path), - WxStrToStr(output_file_path)); + partition->filesystem->ExportFile( + partition->filesystem->FindFileInfo(WxStrToStr(selection_file_path)), + WxStrToStr(output_file_path)); } else { - m_filesystem->ExportFile(WxStrToStr(selection_file_path), WxStrToStr(output_file_path)); + m_filesystem->ExportFile(m_filesystem->FindFileInfo(WxStrToStr(selection_file_path)), + WxStrToStr(output_file_path)); } } @@ -456,6 +458,7 @@ void FilesystemPanel::ExtractDirectories(const std::string& full_path, else { // Look for the dir we are going to extract + // TODO: Make this more efficient for (index = 0; index < fst.size(); ++index) { if (filesystem->GetPathFromFSTOffset(index) == full_path) @@ -513,7 +516,7 @@ void FilesystemPanel::ExtractDirectories(const std::string& full_path, StringFromFormat("%s/%s", output_folder.c_str(), path.c_str()); INFO_LOG(DISCIO, "%s", export_name.c_str()); - if (!File::Exists(export_name) && !filesystem->ExportFile(path, export_name)) + if (!File::Exists(export_name) && !filesystem->ExportFile(&fst[index], export_name)) { ERROR_LOG(DISCIO, "Could not export %s", export_name.c_str()); } |
