From fc531993a9ea4d53bbcc29c032f23907b1c9790c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 27 Mar 2018 21:49:39 -0400 Subject: [PATCH 1/2] DiscExtractor: Pass partition by reference rather than by value in ExtractDirectory() --- Source/Core/DiscIO/DiscExtractor.cpp | 2 +- Source/Core/DiscIO/DiscExtractor.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DiscIO/DiscExtractor.cpp b/Source/Core/DiscIO/DiscExtractor.cpp index f254be68ca..e616a9cac1 100644 --- a/Source/Core/DiscIO/DiscExtractor.cpp +++ b/Source/Core/DiscIO/DiscExtractor.cpp @@ -119,7 +119,7 @@ bool ExportFile(const Volume& volume, const Partition& partition, const std::str return ExportFile(volume, partition, file_system->FindFileInfo(path).get(), export_filename); } -void ExportDirectory(const Volume& volume, const Partition partition, const FileInfo& directory, +void ExportDirectory(const Volume& volume, const Partition& partition, const FileInfo& directory, bool recursive, const std::string& filesystem_path, const std::string& export_folder, const std::function& update_progress) diff --git a/Source/Core/DiscIO/DiscExtractor.h b/Source/Core/DiscIO/DiscExtractor.h index 8157f20273..3471dc700b 100644 --- a/Source/Core/DiscIO/DiscExtractor.h +++ b/Source/Core/DiscIO/DiscExtractor.h @@ -31,7 +31,7 @@ bool ExportFile(const Volume& volume, const Partition& partition, const std::str // update_progress is called once for each child (file or directory). // If update_progress returns true, the extraction gets cancelled. // filesystem_path is supposed to be the path corresponding to the directory argument. -void ExportDirectory(const Volume& volume, const Partition partition, const FileInfo& directory, +void ExportDirectory(const Volume& volume, const Partition& partition, const FileInfo& directory, bool recursive, const std::string& filesystem_path, const std::string& export_folder, const std::function& update_progress); From aa42534fed6435ef3d0c2b5d5ac3b7cccc844d9b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 27 Mar 2018 21:55:16 -0400 Subject: [PATCH 2/2] FilesystemWidget: Pass path QString by const reference instead of by value in ExtractDirectory() Makes it consistent with the surrounding API. Also corrects a typo in ExtractFile's parameter list. --- Source/Core/DolphinQt2/Config/FilesystemWidget.cpp | 2 +- Source/Core/DolphinQt2/Config/FilesystemWidget.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinQt2/Config/FilesystemWidget.cpp b/Source/Core/DolphinQt2/Config/FilesystemWidget.cpp index 73ff255fb3..950833eb72 100644 --- a/Source/Core/DolphinQt2/Config/FilesystemWidget.cpp +++ b/Source/Core/DolphinQt2/Config/FilesystemWidget.cpp @@ -238,7 +238,7 @@ void FilesystemWidget::ExtractSystemData(const DiscIO::Partition& partition, con QMessageBox::critical(nullptr, tr("Error"), tr("Failed to extract system data.")); } -void FilesystemWidget::ExtractDirectory(const DiscIO::Partition& partition, const QString path, +void FilesystemWidget::ExtractDirectory(const DiscIO::Partition& partition, const QString& path, const QString& out) { const DiscIO::FileSystem* filesystem = m_volume->GetFileSystem(partition); diff --git a/Source/Core/DolphinQt2/Config/FilesystemWidget.h b/Source/Core/DolphinQt2/Config/FilesystemWidget.h index 820168c8b5..b06892f811 100644 --- a/Source/Core/DolphinQt2/Config/FilesystemWidget.h +++ b/Source/Core/DolphinQt2/Config/FilesystemWidget.h @@ -36,8 +36,9 @@ private: void ShowContextMenu(const QPoint&); void ExtractPartition(const DiscIO::Partition& partition, const QString& out); - void ExtractDirectory(const DiscIO::Partition& partition, const QString path, const QString& out); - void ExtractFile(const DiscIO::Partition& pratition, const QString& path, const QString& out); + void ExtractDirectory(const DiscIO::Partition& partition, const QString& path, + const QString& out); + void ExtractFile(const DiscIO::Partition& partition, const QString& path, const QString& out); void ExtractSystemData(const DiscIO::Partition& partition, const QString& out); void CheckIntegrity(const DiscIO::Partition& partition);