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 --- src/plugins/FileManager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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