Browse Source
Fixed passing current_folder to DBus for save file dialog (#13491)
Co-authored-by: Herman Kirshin <herman.kirshin@jetbrains.com>
pull/13506/head
Herman K
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/Avalonia.FreeDesktop/DBusSystemDialog.cs
|
|
|
@ -88,7 +88,7 @@ namespace Avalonia.FreeDesktop |
|
|
|
if (options.SuggestedFileName is { } currentName) |
|
|
|
chooserOptions.Add("current_name", new DBusVariantItem("s", new DBusStringItem(currentName))); |
|
|
|
if (options.SuggestedStartLocation?.TryGetLocalPath() is { } folderPath) |
|
|
|
chooserOptions.Add("current_folder", new DBusVariantItem("ay", new DBusByteArrayItem(Encoding.UTF8.GetBytes(folderPath)))); |
|
|
|
chooserOptions.Add("current_folder", new DBusVariantItem("ay", new DBusByteArrayItem(Encoding.UTF8.GetBytes(folderPath + "\0")))); |
|
|
|
|
|
|
|
objectPath = await _fileChooser.SaveFileAsync(parentWindow, options.Title ?? string.Empty, chooserOptions); |
|
|
|
var request = new OrgFreedesktopPortalRequest(_connection, "org.freedesktop.portal.Desktop", objectPath); |
|
|
|
|