Changeset View
Changeset View
Standalone View
Standalone View
src/engine/database.cpp
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Line(s) | 67 | { | |||
---|---|---|---|---|---|
85 | 85 | | |||
86 | if (mode == CreateDatabase) { | 86 | if (mode == CreateDatabase) { | ||
87 | if (!QFileInfo(dir.absolutePath()).permission(QFile::WriteOwner)) { | 87 | if (!QFileInfo(dir.absolutePath()).permission(QFile::WriteOwner)) { | ||
88 | qCritical() << m_path << "does not have write permissions. Aborting"; | 88 | qCritical() << m_path << "does not have write permissions. Aborting"; | ||
89 | return false; | 89 | return false; | ||
90 | } | 90 | } | ||
91 | 91 | | |||
92 | if (!indexInfo.exists()) { | 92 | if (!indexInfo.exists()) { | ||
93 | if (FSUtils::getDirectoryFileSystem(m_path) == QStringLiteral("btrfs")) { | | |||
94 | FSUtils::disableCoW(m_path); | 93 | FSUtils::disableCoW(m_path); | ||
95 | } | 94 | } | ||
96 | } | 95 | } | ||
97 | } | | |||
98 | 96 | | |||
99 | int rc = mdb_env_create(&m_env); | 97 | int rc = mdb_env_create(&m_env); | ||
100 | if (rc) { | 98 | if (rc) { | ||
101 | m_env = nullptr; | 99 | m_env = nullptr; | ||
102 | return false; | 100 | return false; | ||
103 | } | 101 | } | ||
104 | 102 | | |||
105 | /** | 103 | /** | ||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |