Browse Source
Merge pull request #1767 from AvaloniaUI/fixes/1766-fix-mac-file-dialogs
remove file:// from strings returned by mac file dialogs.
pull/1769/head
danwalmsley
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
src/OSX/Avalonia.MonoMac/SystemDialogsImpl.cs
|
|
|
@ -25,9 +25,9 @@ namespace Avalonia.MonoMac |
|
|
|
else |
|
|
|
{ |
|
|
|
if (panel is NSOpenPanel openPanel) |
|
|
|
tcs.SetResult(openPanel.Urls.Select(url => url.AbsoluteString).ToArray()); |
|
|
|
tcs.SetResult(openPanel.Urls.Select(url => url.AbsoluteString.Replace("file://", "")).ToArray()); |
|
|
|
else |
|
|
|
tcs.SetResult(new[] { panel.Url.AbsoluteString }); |
|
|
|
tcs.SetResult(new[] { panel.Url.AbsoluteString.Replace("file://", "") }); |
|
|
|
} |
|
|
|
panel.OrderOut(panel); |
|
|
|
keyWindow?.MakeKeyAndOrderFront(keyWindow); |
|
|
|
|