[Fix] use working directory instead of executable directory

This commit is contained in:
Alois 2026-05-18 21:25:21 +02:00
commit c04e70ef85
4 changed files with 5256 additions and 24 deletions

5236
communities/Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -9,6 +9,7 @@ use crate::{
use async_trait::async_trait;
use json::{JsonValue, array, object};
use std::fs;
use std::path::Path;
use std::sync::Arc;
use std::{any::Any, collections::HashMap};
use ttp_core::{CommunicationType, CommunicationValue, DataTypes};
@ -36,7 +37,9 @@ impl TextChat {
self.get_name()
);
if let Err(e) = fs::create_dir_all(user_dir) {
let working_dir = iota_util::file_util::get_directory();
let full_dir = Path::new(&working_dir).join(user_dir);
if let Err(e) = fs::create_dir_all(&full_dir) {
log!("Failed to create chat directory: {}", e);
return;
}