aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/FileManager.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-03-05 18:03:49 +0100
committerdec05eba <dec05eba@protonmail.com>2024-03-05 18:03:49 +0100
commite477c0c2c5a10d72fbb0e1f154db2359e6dbaaff (patch)
tree5f3db64786a75b66003abbbf21e6ec114bb7ba1e /src/plugins/FileManager.cpp
parentacc41524f17267448738644edd88b1664056bb34 (diff)
Fucking standard library c++ exception
Diffstat (limited to 'src/plugins/FileManager.cpp')
-rw-r--r--src/plugins/FileManager.cpp6
1 files changed, 4 insertions, 2 deletions
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);