forked from blue/squawk
Fixes for Windows
1. On Windows, the lmdb file is immediately allocated at full size. So we have to limit the size. 2. Windows need an organization name for QSettings to work. So an organization name is added for Windows target.
This commit is contained in:
parent
8b3752ef47
commit
7db269acb5
2 changed files with 19 additions and 2 deletions
|
@ -58,7 +58,15 @@ void Core::Archive::open(const QString& account)
|
|||
}
|
||||
|
||||
mdb_env_set_maxdbs(environment, 5);
|
||||
mdb_env_set_mapsize(environment, 512UL * 1024UL * 1024UL);
|
||||
mdb_env_set_mapsize(environment,
|
||||
#ifdef Q_OS_WIN
|
||||
// On Windows, the file is immediately allocated.
|
||||
// So we have to limit the size.
|
||||
80UL * 1024UL * 1024UL
|
||||
#else
|
||||
512UL * 1024UL * 1024UL
|
||||
#endif
|
||||
);
|
||||
mdb_env_open(environment, path.toStdString().c_str(), 0, 0664);
|
||||
|
||||
MDB_txn *txn;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue