From e477c0c2c5a10d72fbb0e1f154db2359e6dbaaff Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 5 Mar 2024 18:03:49 +0100 Subject: Fucking standard library c++ exception --- depends/mglpp | 2 +- src/plugins/FileManager.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/depends/mglpp b/depends/mglpp index 8fa216c..3f07fa1 160000 --- a/depends/mglpp +++ b/depends/mglpp @@ -1 +1 @@ -Subproject commit 8fa216c7639276c57e544a2ec2bf5ed2458a7d5a +Subproject commit 3f07fa13a3e93eea87e2a885fa24ae6ea0aeb88e diff --git a/src/plugins/FileManager.cpp b/src/plugins/FileManager.cpp index c731ec2..7508776 100644 --- a/src/plugins/FileManager.cpp +++ b/src/plugins/FileManager.cpp @@ -37,14 +37,16 @@ namespace QuickMedia { else new_path = current_dir / args.url; - if(std::filesystem::is_regular_file(new_path)) { + std::error_code regular_file_err; + if(std::filesystem::is_regular_file(new_path, regular_file_err)) { 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)) + std::error_code is_dir_err; + if(!std::filesystem::is_directory(new_path, is_dir_err)) return PluginResult::ERR; current_dir = std::move(new_path); -- cgit v1.2.3