Ref: Integriert credentials-Modul und passt WebDAV-Mount-Logik an, entfernt eingebettete Zugangsdaten.
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
pub mod mount;
|
pub mod mount;
|
||||||
pub mod mounted;
|
pub mod mounted;
|
||||||
|
pub mod credentials;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
use crate::config::get_config;
|
use crate::config::get_config;
|
||||||
|
use crate::filesystem::credentials::save_credentials_webdav;
|
||||||
use crate::filesystem::mount::{mount, unmount};
|
use crate::filesystem::mount::{mount, unmount};
|
||||||
use crate::filesystem::mounted::{is_mounted, is_mounted_as};
|
use crate::filesystem::mounted::{is_mounted, is_mounted_as};
|
||||||
use crate::log::log;
|
use crate::log::log;
|
||||||
@@ -154,8 +155,12 @@ fn mount_remote() {
|
|||||||
unmount(mount_point);
|
unmount(mount_point);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if mount_type == "davfs" || mount_type == "webdav" {
|
||||||
|
save_credentials_webdav();
|
||||||
|
}
|
||||||
|
|
||||||
log("main", "Mounting remote filesystem...", LogLevel::Info);
|
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 {
|
} else {
|
||||||
log("main", "Remote server not reachable.", LogLevel::Warn);
|
log("main", "Remote server not reachable.", LogLevel::Warn);
|
||||||
|
|||||||
Reference in New Issue
Block a user