Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/keepass2android-app/fileselect/FileDbHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ public long CreateFile(IOConnectionInfo ioc, string keyFile, bool updateLastUsag
long id = cursor.GetLong(cursor.GetColumnIndexOrThrow(KeyFileId));

var vals = new ContentValues();
vals.Put(KeyFileKeyfile, keyFile);
// Only update the keyfile if explicitly provided. null means "unknown - preserve existing value".
// An empty string "" is used to intentionally clear the keyfile (e.g. when remember_keyfile is off).
if (keyFile != null)
vals.Put(KeyFileKeyfile, keyFile);
if (updateLastUsageTimestamp)
vals.Put(KeyFileUpdated, Java.Lang.JavaSystem.CurrentTimeMillis());

Expand Down
Loading