diff options
Diffstat (limited to '')
-rw-r--r-- | gui/action.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gui/action.cpp b/gui/action.cpp index 97d95f170..265d6de0f 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -995,15 +995,19 @@ int GUIAction::flash(std::string arg) // We're going to jump to this page first, like a loading page gui_changePage(arg); for (i=0; i<zip_queue_index; i++) { + string zip_path = zip_queue[i]; + size_t slashpos = zip_path.find_last_of('/'); + string zip_filename = (slashpos == string::npos) ? zip_path : zip_path.substr(slashpos + 1); operation_start("Flashing"); - DataManager::SetValue("tw_filename", zip_queue[i]); + DataManager::SetValue("tw_filename", zip_path); + DataManager::SetValue("tw_file", zip_filename); DataManager::SetValue(TW_ZIP_INDEX, (i + 1)); TWFunc::SetPerformanceMode(true); - ret_val = flash_zip(zip_queue[i], &wipe_cache); + ret_val = flash_zip(zip_path, &wipe_cache); TWFunc::SetPerformanceMode(false); if (ret_val != 0) { - gui_print("Error flashing zip '%s'\n", zip_queue[i].c_str()); + gui_print("Error flashing zip '%s'\n", zip_path.c_str()); ret_val = 1; break; } |