feat(linux): add --mount-point CLI option and platform-aware mount messages
Sanctum Release / Build & Release (Windows x86_64) (push) Canceled after 0s
Sanctum Release / Build & Release (Windows x86_64) (push) Canceled after 0s
This commit is contained in:
+22
-9
@@ -68,10 +68,14 @@ enum Commands {
|
||||
#[arg(short, long)]
|
||||
path: PathBuf,
|
||||
|
||||
/// Laufwerksbuchstabe (z. B. 'S' oder 'S:', optional; wählt standardmäßig automatisch das nächste freie Laufwerk)
|
||||
/// Laufwerksbuchstabe (z. B. 'S' oder 'S:', optional; wählt unter Windows standardmäßig das nächste freie Laufwerk)
|
||||
#[arg(short, long)]
|
||||
drive: Option<String>,
|
||||
|
||||
/// Optionaler lokaler Mount-Pfad unter Linux/macOS (z. B. '/mnt/sanctum' oder '~/vault')
|
||||
#[arg(short = 'm', long = "mount-point", value_name = "DIR")]
|
||||
mount_point: Option<PathBuf>,
|
||||
|
||||
/// Optionaler TCP-Port für den lokalen WebDAV-Server (Standard: 8443)
|
||||
#[arg(long)]
|
||||
port: Option<u16>,
|
||||
@@ -904,6 +908,7 @@ async fn run() -> Result<()> {
|
||||
Commands::Mount {
|
||||
path,
|
||||
drive,
|
||||
mount_point,
|
||||
port,
|
||||
recovery_key,
|
||||
no_open,
|
||||
@@ -916,15 +921,22 @@ async fn run() -> Result<()> {
|
||||
let drive_char = match drive {
|
||||
Some(ref d) => parse_drive_letter(d)?,
|
||||
None => {
|
||||
let auto_drive = sanctum::windows::find_next_available_drive()?;
|
||||
if !stealth {
|
||||
println!(
|
||||
" {} Kein Laufwerksbuchstabe angegeben. Wähle automatisch freien Buchstaben {}:",
|
||||
ui::cyan("ℹ"),
|
||||
auto_drive
|
||||
);
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let auto_drive = sanctum::windows::find_next_available_drive()?;
|
||||
if !stealth {
|
||||
println!(
|
||||
" {} Kein Laufwerksbuchstabe angegeben. Wähle automatisch freien Buchstaben {}:",
|
||||
ui::cyan("ℹ"),
|
||||
auto_drive
|
||||
);
|
||||
}
|
||||
auto_drive
|
||||
}
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
'Z'
|
||||
}
|
||||
auto_drive
|
||||
}
|
||||
};
|
||||
let auth = if let Some(key) = recovery_key {
|
||||
@@ -953,6 +965,7 @@ async fn run() -> Result<()> {
|
||||
mount_container(
|
||||
&path,
|
||||
drive_char,
|
||||
mount_point.as_deref(),
|
||||
port,
|
||||
auth,
|
||||
open_explorer,
|
||||
|
||||
Reference in New Issue
Block a user