From 8d2fc9ea22112f5274edae5409cf5230ed49a018 Mon Sep 17 00:00:00 2001 From: DragonSlayer_14 Date: Thu, 21 Aug 2025 14:02:08 +0200 Subject: [PATCH] Ref: Integriert `credentials`-Modul und passt WebDAV-Mount-Logik an, entfernt eingebettete Zugangsdaten. --- src/filesystem/mod.rs | 1 + src/main.rs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/filesystem/mod.rs b/src/filesystem/mod.rs index c04de72..541fb16 100644 --- a/src/filesystem/mod.rs +++ b/src/filesystem/mod.rs @@ -1,2 +1,3 @@ pub mod mount; pub mod mounted; +pub mod credentials; diff --git a/src/main.rs b/src/main.rs index fa8ca02..ba680e3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,5 @@ use crate::config::get_config; +use crate::filesystem::credentials::save_credentials_webdav; use crate::filesystem::mount::{mount, unmount}; use crate::filesystem::mounted::{is_mounted, is_mounted_as}; use crate::log::log; @@ -154,8 +155,12 @@ fn mount_remote() { unmount(mount_point); } + if mount_type == "davfs" || mount_type == "webdav" { + save_credentials_webdav(); + } + log("main", "Mounting remote filesystem...", LogLevel::Info); - mount(mount_point, &*format!("{}:{}@{}", get_config().remote.username, get_config().remote.password, get_config().remote.mount_path), mount_type); + mount(mount_point, &*get_config().remote.mount_path, mount_type); } } else { log("main", "Remote server not reachable.", LogLevel::Warn);