aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/FileManager.cpp16
-rw-r--r--src/plugins/Mangadex.cpp2
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;