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:
AlexVallat
2013-06-30 09:47:40 +01:00
parent 41e9c80456
commit b58d58771b
5 changed files with 43 additions and 37 deletions

View File

@@ -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();