Commit c584dc5e authored by Lukas Appelhans's avatar Lukas Appelhans

akabei-create-db remove done

parent f3de0c6f
......@@ -790,10 +790,31 @@ void CreateDb::remove()
out << endl;
if (failed) {
out << endl;
out << "There has been an error during the removal! The temporary database is going to be deleted!" << endl;
out.flush();
delete db;
QFile::remove(unc);
QCoreApplication::instance()->exit(1);
} else {
out << endl;
out << "Trying to move database back to original path" << endl;
out.flush();
QHash<QString, QString> files;
files.insert(unc.split("/").last(), unc);
if (!writeArchive(compressedDbPath, files)) {
out << endl;
out << "There has been an error writing the archive to the original destination!" << endl;
out << "PLEASE CHECK MANUALLY WHETHER THE DATABASE IS CORRUPT OR NOT AND RECREATE IT IF NEEDED!" << endl;
out.flush();
QCoreApplication::instance()->exit(1);
} else {
out << endl;
out << "Database compressed and moved to original destination successfully!" << endl;
out.flush();
}
}
QCoreApplication::instance()->exit(0);
}
#include "createdb.moc"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment