From: Mikko Rasa Date: Tue, 3 Jan 2023 17:32:29 +0000 (+0200) Subject: Avoid exception if plugins directory is not found X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=52719526cc36271872280b987c7bf2393073f98b;p=builder.git Avoid exception if plugins directory is not found --- 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$"))