Fixed bug with loading attachments from kdb
Update to GPL V3 Regard CanWrite in UI
This commit is contained in:
@@ -125,7 +125,7 @@ namespace keepass2android
|
||||
SetFieldIfAvailable(pwEntry, PwDefs.PasswordField, true, entryV3.Password);
|
||||
SetFieldIfAvailable(pwEntry, PwDefs.NotesField, true, entryV3.Additional);
|
||||
|
||||
if (entryV3.GetBinaryData() != null)
|
||||
if ((entryV3.GetBinaryData() != null) && (entryV3.GetBinaryData().Length > 0))
|
||||
{
|
||||
pwEntry.Binaries.Set(entryV3.BinaryDesc, new ProtectedBinary(true, entryV3.GetBinaryData()));
|
||||
}
|
||||
|
||||
@@ -83,6 +83,13 @@ namespace keepass2android
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_app.GetDb().CanWrite == false)
|
||||
{
|
||||
//this should only happen if there is a problem in the UI so that the user sees an edit interface.
|
||||
Finish(false,"Cannot save changes. File is read-only!");
|
||||
return;
|
||||
}
|
||||
|
||||
StatusLogger.UpdateMessage(UiStringKey.saving_database);
|
||||
IOConnectionInfo ioc = _app.GetDb().Ioc;
|
||||
IFileStorage fileStorage = _app.GetFileStorage(ioc);
|
||||
|
||||
Reference in New Issue
Block a user