mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-15 23:54:58 +00:00
fix: OpenFolderPickerAsync
raise exception when selected a drive root such as E:\
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
1bd2044589
commit
bc5deac9fe
8 changed files with 32 additions and 9 deletions
|
@ -250,7 +250,9 @@ namespace SourceGit.Views
|
|||
var selected = await StorageProvider.OpenFolderPickerAsync(options);
|
||||
if (selected.Count == 1)
|
||||
{
|
||||
ViewModels.Preferences.Instance.GitDefaultCloneDir = selected[0].Path.LocalPath;
|
||||
var folder = selected[0];
|
||||
var folderPath = folder is { Path: { IsAbsoluteUri: true } path } ? path.LocalPath : folder?.Path.ToString();
|
||||
ViewModels.Preferences.Instance.GitDefaultCloneDir = folderPath;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue