diff options
| author | JosJuice <josjuice@gmail.com> | 2017-06-18 14:17:33 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2017-06-28 22:22:41 +0200 |
| commit | 39ff203c1e60cae0f31fc881cd88fa68a203b79f (patch) | |
| tree | afc696fc384caef4b5265fdb954362f0d5c3a070 /Source/Core/DiscIO/DiscExtractor.cpp | |
| parent | 6d5199264895f007b9714d448519f5fafec00fa6 (diff) | |
DiscExtractor: Don't create extra folders when extracting a folder
Before, if you extracted a directory like /map/Final/Release/,
Dolphin would create the nested folders map, Final and Release
in the output directory and put the files in Release instead of
just putting the files directly in the output directory.
Diffstat (limited to 'Source/Core/DiscIO/DiscExtractor.cpp')
| -rw-r--r-- | Source/Core/DiscIO/DiscExtractor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/DiscIO/DiscExtractor.cpp b/Source/Core/DiscIO/DiscExtractor.cpp index dbd5a7a821..9a2dd16487 100644 --- a/Source/Core/DiscIO/DiscExtractor.cpp +++ b/Source/Core/DiscIO/DiscExtractor.cpp @@ -76,11 +76,13 @@ void ExportDirectory(const Volume& volume, const Partition partition, const File const std::string& export_folder, const std::function<bool(const std::string& path)>& update_progress) { + File::CreateFullPath(export_folder + '/'); + for (const FileInfo& file_info : directory) { - const std::string path = - filesystem_path + file_info.GetName() + (file_info.IsDirectory() ? "/" : ""); - const std::string export_path = export_folder + '/' + path; + 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; if (update_progress(path)) return; @@ -96,9 +98,7 @@ void ExportDirectory(const Volume& volume, const Partition partition, const File } else if (recursive) { - File::CreateFullPath(export_path); - ExportDirectory(volume, partition, file_info, recursive, path, export_folder, - update_progress); + ExportDirectory(volume, partition, file_info, recursive, path, export_path, update_progress); } } } |
