diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-05-11 14:24:52 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-05-11 14:24:52 +0200 |
commit | e308d77b06405b91885cf6f97c0dc2a1b70679ef (patch) | |
tree | 7fb0ed73c20354f3e0ff49ebb199e33ebc3427f7 /src/plugins | |
parent | 6b90f55f4dc14b9d39fa0dbf6b82b3c12ccc29d9 (diff) |
Improve file saving gui
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/FileManager.cpp | 16 | ||||
-rw-r--r-- | src/plugins/Mangadex.cpp | 2 |
2 files changed, 2 insertions, 16 deletions
diff --git a/src/plugins/FileManager.cpp b/src/plugins/FileManager.cpp index e1f3b04..6ee7e71 100644 --- a/src/plugins/FileManager.cpp +++ b/src/plugins/FileManager.cpp @@ -39,18 +39,10 @@ namespace QuickMedia { return PluginResult::OK; } - if(!std::filesystem::is_directory(new_path)) { - if(allow_empty_match_submit) { - program->select_file(new_path); - if(selection_handler) - result_tabs = selection_handler(this, new_path); - return PluginResult::OK; - } + if(!std::filesystem::is_directory(new_path)) return PluginResult::ERR; - } current_dir = std::move(new_path); - this->title = title_prefix + current_dir.string(); BodyItems result_items; PluginResult result = get_files_in_directory(result_items); @@ -63,16 +55,10 @@ namespace QuickMedia { return PluginResult::OK; } - void FileManagerPage::on_navigate_to_page(Body*) { - if(close) - program->set_go_to_previous_page(); - } - bool FileManagerPage::set_current_directory(const std::string &path) { if(!std::filesystem::is_directory(path)) return false; current_dir = path; - title = title_prefix + current_dir.string(); return true; } diff --git a/src/plugins/Mangadex.cpp b/src/plugins/Mangadex.cpp index f69484b..0b50366 100644 --- a/src/plugins/Mangadex.cpp +++ b/src/plugins/Mangadex.cpp @@ -216,7 +216,7 @@ namespace QuickMedia { return PluginResult::ERR; std::string base_url = base_url_json.asString(); - if(base_url.back() != '/') + if(!base_url.empty() && base_url.back() != '/') base_url += '/'; auto image_urls = static_cast<MangadexChapterImagesList*>(submit_body_item->extra.get())->image_urls; |