From 44669c3825413bd71d169c435c170c51a7252cbd Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Sat, 4 Apr 2026 10:23:42 -0300 Subject: [PATCH] fix: Fix resolve_export_path typo and remove unused PathBuf imports --- src/basic/keywords/import_export.rs | 2 +- src/basic/keywords/use_tool.rs | 2 +- src/core/bot/tool_context.rs | 1 - src/core/bot/tool_executor.rs | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/basic/keywords/import_export.rs b/src/basic/keywords/import_export.rs index 27bfd7a8..bbddb62c 100644 --- a/src/basic/keywords/import_export.rs +++ b/src/basic/keywords/import_export.rs @@ -196,7 +196,7 @@ fn execute_export( file_path: &str, data: Dynamic, ) -> Result> { - let full_path = resolve_export_path(state, user, file_path)?; + let full_path = resolve_file_path(state, user, file_path)?; let extension = Path::new(&full_path) .extension() .and_then(|e| e.to_str()) diff --git a/src/basic/keywords/use_tool.rs b/src/basic/keywords/use_tool.rs index ce6325bc..d8833ea7 100644 --- a/src/basic/keywords/use_tool.rs +++ b/src/basic/keywords/use_tool.rs @@ -3,7 +3,7 @@ use crate::core::shared::state::AppState; use diesel::prelude::*; use log::{error, info, trace, warn}; use rhai::{Dynamic, Engine}; -use std::path::{Path, PathBuf}; +use std::path::Path; use std::sync::Arc; use uuid::Uuid; pub fn use_tool_keyword(state: Arc, user: UserSession, engine: &mut Engine) { diff --git a/src/core/bot/tool_context.rs b/src/core/bot/tool_context.rs index 2c98fb74..f0cebd8e 100644 --- a/src/core/bot/tool_context.rs +++ b/src/core/bot/tool_context.rs @@ -1,7 +1,6 @@ use diesel::prelude::*; use log::{debug, info, warn}; use serde_json::{json, Value}; -use std::path::PathBuf; use uuid::Uuid; use crate::core::shared::utils::DbPool; diff --git a/src/core/bot/tool_executor.rs b/src/core/bot/tool_executor.rs index d8d7c54e..7dcfec48 100644 --- a/src/core/bot/tool_executor.rs +++ b/src/core/bot/tool_executor.rs @@ -5,7 +5,7 @@ use serde_json::Value; // use std::collections::HashMap; use std::fs::OpenOptions; use std::io::Write; -use std::path::{Path, PathBuf}; +use std::path::Path; use std::sync::Arc; use uuid::Uuid;