Ref: Integriert credentials-Modul und passt WebDAV-Mount-Logik an, entfernt eingebettete Zugangsdaten.

This commit is contained in:
2025-08-21 14:02:08 +02:00
parent 83de0189d9
commit 8d2fc9ea22
2 changed files with 7 additions and 1 deletions

View File

@@ -1,2 +1,3 @@
pub mod mount;
pub mod mounted;
pub mod credentials;

View File

@@ -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);