Kdbp format selection by filename. If the filename ends in .kdbp, it is assumed to be kdbp format. Otherwise, kdbx format is used. A file is always saved in the same format it is opened in.
This commit is contained in:
@@ -588,7 +588,7 @@ namespace KeePassLib
|
||||
kdbx.DetachBinaries = m_strDetachBins;
|
||||
|
||||
Stream s = IOConnection.OpenRead(ioSource);
|
||||
kdbx.Load(s, KdbxFormat.Default, slLogger);
|
||||
kdbx.Load(s, KdbpFile.GetFormatToUse(ioSource), slLogger);
|
||||
s.Close();
|
||||
|
||||
m_pbHashOfLastIO = kdbx.HashOfFileOnDisk;
|
||||
@@ -623,7 +623,7 @@ namespace KeePassLib
|
||||
Stream s = ft.OpenWrite();
|
||||
|
||||
KdbxFile kdb = new KdbxFile(this);
|
||||
kdb.Save(s, null, KdbxFormat.Default, slLogger);
|
||||
kdb.Save(s, null, KdbpFile.GetFormatToUse(m_ioSource), slLogger);
|
||||
|
||||
ft.CommitWrite();
|
||||
|
||||
|
Reference in New Issue
Block a user