diff --git a/sphaira/source/ui/menus/filebrowser.cpp b/sphaira/source/ui/menus/filebrowser.cpp index c6d4fad..e4f4718 100644 --- a/sphaira/source/ui/menus/filebrowser.cpp +++ b/sphaira/source/ui/menus/filebrowser.cpp @@ -552,7 +552,7 @@ Menu::Menu(const std::vector& nro_entries) : MenuBase{"FileBrowser"_i1 if (m_entries_current.size()) { if (check_all_ext(ZIP_EXTENSIONS)) { - options->Add(std::make_shared("Extract"_i18n, [this](){ + options->Add(std::make_shared("Extract zip"_i18n, [this](){ auto options = std::make_shared("Extract Options"_i18n, Sidebar::Side::RIGHT); ON_SCOPE_EXIT(App::Push(options)); @@ -564,6 +564,19 @@ Menu::Menu(const std::vector& nro_entries) : MenuBase{"FileBrowser"_i1 } })); + options->Add(std::make_shared("Extract to root"_i18n, [this](){ + App::Push(std::make_shared("Are you sure you want to extract to root?"_i18n, + "No"_i18n, "Yes"_i18n, 0, [this](auto op_index){ + if (op_index && *op_index) { + if (!m_selected_count) { + UnzipFile("/", GetEntry()); + } else { + UnzipFiles("/", GetSelectedEntries()); + } + } + })); + })); + options->Add(std::make_shared("Extract to..."_i18n, [this](){ std::string out; if (R_SUCCEEDED(swkbd::ShowText(out, "Enter the path to the folder to extract into", fs::AppendPath(m_path, ""))) && !out.empty()) { @@ -578,7 +591,7 @@ Menu::Menu(const std::vector& nro_entries) : MenuBase{"FileBrowser"_i1 } if (!check_all_ext(ZIP_EXTENSIONS) || m_selected_count) { - options->Add(std::make_shared("Compress"_i18n, [this](){ + options->Add(std::make_shared("Compress to zip"_i18n, [this](){ auto options = std::make_shared("Compress Options"_i18n, Sidebar::Side::RIGHT); ON_SCOPE_EXIT(App::Push(options));