Commit db47701e authored by Lukas Appelhans's avatar Lukas Appelhans

Fix some swag

parent d9c59c60
......@@ -421,6 +421,7 @@ OperationRunner* Backend::operationRunner()
Package* Backend::loadPackageFromFile(const QString& path)
{
//TODO: Generate md5sums of backup files
Q_D(Backend);
int ret = ARCHIVE_OK;
struct archive *archive;
......
......@@ -266,6 +266,8 @@ void Operation::setProgress(int percentage)
void Operation::setFinished(bool result)
{
Q_D(Operation);
if ((result && d->status == StatusPerformed) || (!result && d->status == StatusError))
return;
if (result) {
d->setStatus(StatusPerformed);
} else {
......
......@@ -106,7 +106,7 @@ void PlainReInstallOperation::run()
// It's a directory (or something else we don't want to remove :D)
continue;
}
if (QFile::remove(file) && !(processingOptions().testFlag(Akabei::Force))) {
if (!QFile::remove(file) && !(processingOptions().testFlag(Akabei::Force))) {
setErrors(QList<Akabei::Error*>() << new Akabei::Error(Akabei::Error::UnknownError, QObject::tr("Removing %1 file failed!").arg(file), this));
setFinished(false);
}
......
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