From 52719526cc36271872280b987c7bf2393073f98b Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 3 Jan 2023 19:32:29 +0200 Subject: [PATCH] Avoid exception if plugins directory is not found --- source/lib/builder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/lib/builder.cpp b/source/lib/builder.cpp index c8c7bf8..08e9cd7 100644 --- a/source/lib/builder.cpp +++ b/source/lib/builder.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -47,6 +48,9 @@ void Builder::load_plugins() using CreateFunc = Plugin *(Builder &); FS::Path plugins_dir = FS::get_sys_lib_dir(); + if(!FS::exists(plugins_dir)) + return; + logger->log("files", "Traversing %s", plugins_dir); vector unordered_plugins; for(const string &f: list_filtered(plugins_dir, "\\.dlm$")) -- 2.45.2