Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
linux: Set directory in SaveFileRequest dialog (#13850)
Thorsten Ballfc8749ffd796
diff --git a/crates/gpui/src/platform/linux/platform.rs b/crates/gpui/src/platform/linux/platform.rsindex 9eef459d5dc..0e46419b392 100644--- a/crates/gpui/src/platform/linux/platform.rs+++ b/crates/gpui/src/platform/linux/platform.rs@@ -314,20 +314,27 @@ impl<P: LinuxClient + 'static> Platform for P {let directory = directory.to_owned();self.foreground_executor().spawn(async move {- let result = SaveFileRequest::default()+ let request = SaveFileRequest::default().modal(true).title("Select new path").accept_label("Accept")- .send()- .await- .ok()- .and_then(|request| request.response().ok())- .and_then(|response| {- response- .uris()- .first()- .and_then(|uri| uri.to_file_path().ok())- });+ .current_folder(directory);++ let result = if let Ok(request) = request {+ request+ .send()+ .await+ .ok()+ .and_then(|request| request.response().ok())+ .and_then(|response| {+ response+ .uris()+ .first()+ .and_then(|uri| uri.to_file_path().ok())+ })+ } else {+ None+ };done_tx.send(result);})