From 51d50c76dcd654b7b0ec187593e31f9c38757823 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 7 Nov 2025 19:18:14 -0500 Subject: [WARP] Explicitly create user signature directory on plugin init Fixes cases where the user signature directory for some reason has not been created, typically the directory will exist as the sigkit runner will also try and create the directory. --- plugins/warp/src/plugin.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugins/warp/src/plugin.rs') diff --git a/plugins/warp/src/plugin.rs b/plugins/warp/src/plugin.rs index 917c849d..f384a6f5 100644 --- a/plugins/warp/src/plugin.rs +++ b/plugins/warp/src/plugin.rs @@ -119,6 +119,13 @@ fn load_network_container() { fn plugin_init() -> bool { Logger::new("WARP").with_level(LevelFilter::Debug).init(); + // Create the user signature directory if it does not exist, otherwise we will not be able to write to it. + if !user_signature_dir().exists() { + if let Err(e) = std::fs::create_dir_all(&user_signature_dir()) { + log::error!("Failed to create user signature directory: {}", e); + } + } + // Register our matcher and plugin settings globally. let mut global_bn_settings = Settings::new(); global_bn_settings.register_group("warp", "WARP"); -- cgit v1.3.1