fix potential crash when an unknown scheme is entered while editing the URL of a recent file, fixes https://github.com/PhilippC/keepass2android/issues/1055
This commit is contained in:
@@ -31,6 +31,7 @@ using Java.IO;
|
||||
using KeePassLib.Serialization;
|
||||
using Keepass2android.Pluginsdk;
|
||||
using keepass2android.Io;
|
||||
using Console = System.Console;
|
||||
using Environment = Android.OS.Environment;
|
||||
|
||||
namespace keepass2android
|
||||
@@ -302,6 +303,16 @@ namespace keepass2android
|
||||
|
||||
private void EditFileEntry(string filename, IOConnectionInfo newConnectionInfo)
|
||||
{
|
||||
try
|
||||
{
|
||||
App.Kp2a.GetFileStorage(newConnectionInfo);
|
||||
}
|
||||
catch (NoFileStorageFoundException)
|
||||
{
|
||||
Toast.MakeText(this, "Don't know how to handle " + newConnectionInfo.Path, ToastLength.Long).Show();
|
||||
return;
|
||||
}
|
||||
|
||||
_dbHelper.CreateFile(newConnectionInfo, _dbHelper.GetKeyFileForFile(filename), false);
|
||||
_dbHelper.DeleteFile(filename);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user