fix: features and enhancements — issues #70, #36, #34, #33, #32, #57, #40, #37

This commit is contained in:
2026-07-20 18:24:17 +02:00
parent 504a3a4d4f
commit 2ad8f92596
14 changed files with 232 additions and 108 deletions
+24 -2
View File
@@ -13,6 +13,26 @@
#include <string.h>
#include <threads.h>
static const char* filename_from_path(const char* path) {
const char* slash = strrchr(path, '/');
return slash ? slash + 1 : path;
}
static bool should_exclude_file(const Config* config, const char* filename) {
for (int i = 0; i < config->exclude_count; i++) {
if (glob_match(config->exclude_patterns[i], filename))
return true;
}
if (config->include_count > 0) {
for (int i = 0; i < config->include_count; i++) {
if (glob_match(config->include_patterns[i], filename))
return true;
}
return false;
}
return false;
}
PipelineContextSender* pipeline_context_sender_create(Config* config, Queue* queue_scanner,
Queue* queue_loader) {
PipelineContextSender* context = malloc(sizeof(PipelineContextSender));
@@ -155,8 +175,10 @@ int write_thread(void* pipeline_context) {
free(root_directory);
return thrd_success;
}
if (save_to_disk)
file_save_to_disk(root_directory, file);
if (save_to_disk) {
if (!should_exclude_file(context->config, filename_from_path(file->path)))
file_save_to_disk(root_directory, file);
}
file_destroy(file);
}
}