| 190 | } |
| 191 | |
| 192 | void V1::deleteModIndex(QDir& index_dir, QString& mod_slug) |
| 193 | { |
| 194 | auto normalized_fname = indexFileName(mod_slug); |
| 195 | auto real_fname = getRealIndexName(index_dir, normalized_fname); |
| 196 | if (real_fname.isEmpty()) |
| 197 | return; |
| 198 | |
| 199 | QFile index_file(index_dir.absoluteFilePath(real_fname)); |
| 200 | |
| 201 | if (!index_file.exists()) { |
| 202 | qWarning() << QString("Tried to delete non-existent mod metadata for %1!").arg(mod_slug); |
| 203 | return; |
| 204 | } |
| 205 | |
| 206 | if (!index_file.remove()) { |
| 207 | qWarning() << QString("Failed to remove metadata for mod %1!").arg(mod_slug); |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | void V1::deleteModIndex(QDir& index_dir, QVariant& mod_id) |
| 212 | { |
nothing calls this directly
no test coverage detected