Merge pull request #6549 from lioncash/disc

DiscExtractor: Pass partition by reference rather than by value in ExtractDirectory()
This commit is contained in:
JosJuice 2018-03-28 07:32:09 +02:00 committed by GitHub
commit d0152ed6a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -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); 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, bool recursive, const std::string& filesystem_path,
const std::string& export_folder, const std::string& export_folder,
const std::function<bool(const std::string& path)>& update_progress) const std::function<bool(const std::string& path)>& update_progress)

View File

@ -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). // update_progress is called once for each child (file or directory).
// If update_progress returns true, the extraction gets cancelled. // If update_progress returns true, the extraction gets cancelled.
// filesystem_path is supposed to be the path corresponding to the directory argument. // 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, bool recursive, const std::string& filesystem_path,
const std::string& export_folder, const std::string& export_folder,
const std::function<bool(const std::string& path)>& update_progress); const std::function<bool(const std::string& path)>& update_progress);

View File

@ -238,7 +238,7 @@ void FilesystemWidget::ExtractSystemData(const DiscIO::Partition& partition, con
QMessageBox::critical(nullptr, tr("Error"), tr("Failed to extract system data.")); 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 QString& out)
{ {
const DiscIO::FileSystem* filesystem = m_volume->GetFileSystem(partition); const DiscIO::FileSystem* filesystem = m_volume->GetFileSystem(partition);

View File

@ -36,8 +36,9 @@ private:
void ShowContextMenu(const QPoint&); void ShowContextMenu(const QPoint&);
void ExtractPartition(const DiscIO::Partition& partition, const QString& out); void ExtractPartition(const DiscIO::Partition& partition, const QString& out);
void ExtractDirectory(const DiscIO::Partition& partition, const QString path, const QString& out); void ExtractDirectory(const DiscIO::Partition& partition, const QString& path,
void ExtractFile(const DiscIO::Partition& pratition, const QString& path, const QString& out); 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 ExtractSystemData(const DiscIO::Partition& partition, const QString& out);
void CheckIntegrity(const DiscIO::Partition& partition); void CheckIntegrity(const DiscIO::Partition& partition);