Skip .wms files that start with "." or "_"
This commit is contained in:
parent
9979eddc60
commit
28cefca560
|
@ -56,6 +56,11 @@ void doStart(int argc, char **argv) {
|
||||||
DirList modules(basePath + "/modules", ".wms", DirList::Files, 1);
|
DirList modules(basePath + "/modules", ".wms", DirList::Files, 1);
|
||||||
modules.SortList();
|
modules.SortList();
|
||||||
for (int i = 0; i < modules.GetFilecount(); i++) {
|
for (int i = 0; i < modules.GetFilecount(); i++) {
|
||||||
|
std::string_view asView(modules.GetFilename(i));
|
||||||
|
if (asView.starts_with('.') || asView.starts_with('_')) {
|
||||||
|
DEBUG_FUNCTION_LINE_WARN("Skip file %s", modules.GetFilename(i));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
DEBUG_FUNCTION_LINE("Loading module %s", modules.GetFilepath(i));
|
DEBUG_FUNCTION_LINE("Loading module %s", modules.GetFilepath(i));
|
||||||
auto moduleData = ModuleDataFactory::load(modules.GetFilepath(i));
|
auto moduleData = ModuleDataFactory::load(modules.GetFilepath(i));
|
||||||
if (moduleData) {
|
if (moduleData) {
|
||||||
|
|
|
@ -36,6 +36,8 @@ extern "C" {
|
||||||
|
|
||||||
#define DEBUG_FUNCTION_LINE_ERR(FMT, ARGS...) LOG_EX(WHBLogPrintf, "##ERROR## ", "", FMT, ##ARGS)
|
#define DEBUG_FUNCTION_LINE_ERR(FMT, ARGS...) LOG_EX(WHBLogPrintf, "##ERROR## ", "", FMT, ##ARGS)
|
||||||
|
|
||||||
|
#define DEBUG_FUNCTION_LINE_WARN(FMT, ARGS...) LOG_EX(WHBLogPrintf, "##WARN ## ", "", FMT, ##ARGS)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define DEBUG_FUNCTION_LINE_VERBOSE(FMT, ARGS...) while (0)
|
#define DEBUG_FUNCTION_LINE_VERBOSE(FMT, ARGS...) while (0)
|
||||||
|
@ -46,6 +48,8 @@ extern "C" {
|
||||||
|
|
||||||
#define DEBUG_FUNCTION_LINE_ERR(FMT, ARGS...) LOG_EX(OSReport, "##ERROR## ", "\n", FMT, ##ARGS)
|
#define DEBUG_FUNCTION_LINE_ERR(FMT, ARGS...) LOG_EX(OSReport, "##ERROR## ", "\n", FMT, ##ARGS)
|
||||||
|
|
||||||
|
#define DEBUG_FUNCTION_LINE_WARN(FMT, ARGS...) LOG_EX(OSReport, "##WARN ## ", "\n", FMT, ##ARGS)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void initLogging();
|
void initLogging();
|
||||||
|
|
Loading…
Reference in New Issue