Permalink
Browse files

DolphinQt2: Fix the file structure of extracted discs

Now all the partitions won't be all jumbled up in one folder,
and the filesystem contents won't be mixed with system data.
  • Loading branch information...
JosJuice committed May 5, 2018
1 parent cf40ebf commit 1a74de6462c7fc3d242190e4be02189b8b265b53
Showing with 10 additions and 3 deletions.
  1. +10 −3 Source/Core/DolphinQt2/Config/FilesystemWidget.cpp
@@ -181,8 +181,15 @@ void FilesystemWidget::ShowContextMenu(const QPoint&)
}
else
{
for (auto& p : m_volume->GetPartitions())
ExtractPartition(p, folder);
for (DiscIO::Partition& p : m_volume->GetPartitions())
{
if (const std::optional<u32> partition_type = m_volume->GetPartitionType(p))
{
const std::string partition_name =
DiscIO::DirectoryNameForPartitionType(*partition_type);
ExtractPartition(p, folder + QChar(u'/') + QString::fromStdString(partition_name));
}
}
}
});
break;
@@ -224,7 +231,7 @@ DiscIO::Partition FilesystemWidget::GetPartitionFromID(int id)
void FilesystemWidget::ExtractPartition(const DiscIO::Partition& partition, const QString& out)
{
ExtractDirectory(partition, QStringLiteral(""), out);
ExtractDirectory(partition, QStringLiteral(""), out + QStringLiteral("/files"));
ExtractSystemData(partition, out);
}

0 comments on commit 1a74de6

Please sign in to comment.