diff options
| author | Felipe <felipe.v.b@icloud.com> | 2020-10-27 18:31:05 -0400 |
|---|---|---|
| committer | Felipe <felipe.v.b@icloud.com> | 2020-10-29 15:20:46 -0400 |
| commit | d7fa75ef640bc0c691e9a00c3433c3411dcf9a5c (patch) | |
| tree | 8813d9e31d9cd26e8e078f98951b0a703528bf98 /Source/Core/DiscIO/DiscExtractor.cpp | |
| parent | fe727ed1d095368229720da687f75f175065372d (diff) | |
modify file export to create folder in OS when explicitly extracting a directory
Diffstat (limited to 'Source/Core/DiscIO/DiscExtractor.cpp')
| -rw-r--r-- | Source/Core/DiscIO/DiscExtractor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<bool(const std::string& path)>& 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; |
