Allow any file type for key selection

This commit is contained in:
Geoffroy BONNEVILLE
2020-03-20 17:05:46 +01:00
parent 638bfacadd
commit 34cd4ca3d8

View File

@@ -132,13 +132,12 @@ namespace ModernKeePass.Views.UserControls
private async void KeyFileButton_Click(object sender, RoutedEventArgs e) private async void KeyFileButton_Click(object sender, RoutedEventArgs e)
{ {
var picker = var picker = new FileOpenPicker
new FileOpenPicker {
{ ViewMode = PickerViewMode.List,
ViewMode = PickerViewMode.List, SuggestedStartLocation = PickerLocationId.DocumentsLibrary
SuggestedStartLocation = PickerLocationId.DocumentsLibrary };
}; picker.FileTypeFilter.Add("*");
picker.FileTypeFilter.Add(".key");
// Application now has read/write access to the picked file // Application now has read/write access to the picked file
var file = await picker.PickSingleFileAsync(); var file = await picker.PickSingleFileAsync();