Changeset View
Changeset View
Standalone View
Standalone View
src/engine/documenturldb.h
Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Line(s) | 89 | { | |||
---|---|---|---|---|---|
130 | if (url.isEmpty()) { | 130 | if (url.isEmpty()) { | ||
131 | auto subDocs = idTreeDb.get(docId); | 131 | auto subDocs = idTreeDb.get(docId); | ||
132 | if (!subDocs.isEmpty()) { | 132 | if (!subDocs.isEmpty()) { | ||
133 | // Check if subdocs actually exist or is it a curruption | 133 | // Check if subdocs actually exist or is it a curruption | ||
134 | for (auto const& docId : subDocs) { | 134 | for (auto const& docId : subDocs) { | ||
135 | auto filePath = idFilenameDb.get(docId); | 135 | auto filePath = idFilenameDb.get(docId); | ||
136 | auto fileName = QFile::decodeName(filePath.name); | 136 | auto fileName = QFile::decodeName(filePath.name); | ||
137 | if (QFile::exists(fileName)) { | 137 | if (QFile::exists(fileName)) { | ||
138 | Q_ASSERT_X(idTreeDb.get(docId).isEmpty(), | 138 | if (!idTreeDb.get(docId).isEmpty()) { | ||
139 | "DocumentUrlDB::del", | 139 | qWarning() << "DocumentUrlDB::del" | ||
140 | "This folder still has sub-files in its cache. It cannot be deleted"); | 140 | << "This folder still has sub-files in its cache. It cannot be deleted"; | ||
bruns: indentation | |||||
141 | } | ||||
141 | } else { | 142 | } else { | ||
142 | /* | 143 | /* | ||
143 | * FIXME: this is not an ideal solution we need to figure out how such currptions are | 144 | * FIXME: this is not an ideal solution we need to figure out how such currptions are | ||
144 | * creeping in or at least if we detect some figure out a proper cleaning mechanism | 145 | * creeping in or at least if we detect some figure out a proper cleaning mechanism | ||
145 | */ | 146 | */ | ||
146 | qWarning() << "Database has corrupted entries baloo may misbehave, please recreate the DB by running $ balooctl disable && balooctl enable"; | 147 | qWarning() << "Database has corrupted entries baloo may misbehave, please recreate the DB by running $ balooctl disable && balooctl enable"; | ||
147 | } | 148 | } | ||
148 | } | 149 | } | ||
Show All 10 Lines |
indentation