Changeset View
Changeset View
Standalone View
Standalone View
src/core/installation.cpp
Show First 20 Lines • Show All 529 Lines • ▼ Show 20 Line(s) | 493 | if ((!isarchive && standardResourceDirectory == QLatin1String("wallpaper")) || | |||
---|---|---|---|---|---|
530 | // - this might or might not need to take uncompression into account | 530 | // - this might or might not need to take uncompression into account | ||
531 | // FIXME: for updates, we might need to force an overwrite (that is, deleting before) | 531 | // FIXME: for updates, we might need to force an overwrite (that is, deleting before) | ||
532 | QFile file(payloadfile); | 532 | QFile file(payloadfile); | ||
533 | bool success = true; | 533 | bool success = true; | ||
534 | const bool update = ((entry.status() == KNS3::Entry::Updateable) || (entry.status() == KNS3::Entry::Updating)); | 534 | const bool update = ((entry.status() == KNS3::Entry::Updateable) || (entry.status() == KNS3::Entry::Updating)); | ||
535 | 535 | | |||
536 | if (QFile::exists(installpath) && QDir::tempPath() != installdir) { | 536 | if (QFile::exists(installpath) && QDir::tempPath() != installdir) { | ||
537 | if (!update) { | 537 | if (!update) { | ||
538 | Question question(Question::ContinueCancelQuestion); | 538 | Question question(Question::YesNoQuestion); | ||
539 | question.setQuestion(i18n("Overwrite existing file?") + QStringLiteral("\n'") + installpath + QLatin1Char('\'')); | 539 | question.setQuestion(i18n("This file already exists on disk (possibly due to an earlier failed download attempt). Continuing means overwriting it. Do you wish to overwrite the existing file?") + QStringLiteral("\n'") + installpath + QLatin1Char('\'')); | ||
540 | question.setTitle(i18n("Download File")); | 540 | question.setTitle(i18n("Overwrite File")); | ||
541 | if(question.ask() != Question::ContinueResponse) { | 541 | if(question.ask() != Question::YesResponse) { | ||
542 | return QStringList(); | 542 | return QStringList(); | ||
543 | } | 543 | } | ||
544 | } | 544 | } | ||
545 | success = QFile::remove(installpath); | 545 | success = QFile::remove(installpath); | ||
546 | } | 546 | } | ||
547 | if (success) { | 547 | if (success) { | ||
548 | //remove in case it's already present and in a temporary directory, so we get to actually use the path again | 548 | //remove in case it's already present and in a temporary directory, so we get to actually use the path again | ||
549 | if (installpath.startsWith(QDir::tempPath())) { | 549 | if (installpath.startsWith(QDir::tempPath())) { | ||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |