diff --git a/Source/Core/DiscIO/DiscExtractor.cpp b/Source/Core/DiscIO/DiscExtractor.cpp index a68093aca9..225302bb9c 100644 --- a/Source/Core/DiscIO/DiscExtractor.cpp +++ b/Source/Core/DiscIO/DiscExtractor.cpp @@ -130,13 +130,15 @@ void ExportDirectory(const Volume& volume, const Partition& partition, const Fil const std::string& export_folder, const std::function& update_progress) { - File::CreateFullPath(export_folder + '/'); + const std::string export_root = + export_folder + (directory.IsDirectory() ? "/" + directory.GetName() + "/" : "/"); + File::CreateFullPath(export_root); for (const FileInfo& file_info : directory) { const std::string name = file_info.GetName() + (file_info.IsDirectory() ? "/" : ""); const std::string path = filesystem_path + name; - const std::string export_path = export_folder + '/' + name; + const std::string export_path = export_root + name; if (update_progress(path)) return;