From 6eb79376a5439da7fba1ed0afbac52f9b9075784 Mon Sep 17 00:00:00 2001 From: CoolLoong Date: Tue, 9 Jun 2026 15:49:40 +0800 Subject: [PATCH] feat(sftp): support multi-file uploads --- crates/gpui_sftp/src/view/table/actions.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/gpui_sftp/src/view/table/actions.rs b/crates/gpui_sftp/src/view/table/actions.rs index 2bb7f34..2b204f6 100644 --- a/crates/gpui_sftp/src/view/table/actions.rs +++ b/crates/gpui_sftp/src/view/table/actions.rs @@ -818,8 +818,8 @@ impl SftpTable { let picker = cx.prompt_for_paths(PathPromptOptions { files: true, directories: false, - multiple: false, - prompt: Some("Select file to upload".into()), + multiple: true, + prompt: Some("Select files to upload".into()), }); let window_handle = _window.window_handle(); @@ -832,15 +832,15 @@ impl SftpTable { window.refresh(); }); - let Ok(Ok(Some(mut paths))) = picked else { + let Ok(Ok(Some(paths))) = picked else { return; }; - let Some(local) = paths.pop() else { + if paths.is_empty() { return; - }; + } let _ = this.update(cx, |this, cx| { this.delegate_mut() - .upload_local_files_to_dir(remote_dir.clone(), vec![local], cx); + .upload_local_files_to_dir(remote_dir.clone(), paths, cx); }); }) .detach();