Changeset View
Changeset View
Standalone View
Standalone View
src/core/installation.cpp
Show First 20 Lines • Show All 545 Lines • ▼ Show 20 Line(s) | 511 | if ((!isarchive && standardResourceDirectory == QLatin1String("wallpaper")) || | |||
---|---|---|---|---|---|
546 | // FIXME: what must be done now is to update the cache *again* | 546 | // FIXME: what must be done now is to update the cache *again* | ||
547 | // in order to set the new payload filename (on root tag only) | 547 | // in order to set the new payload filename (on root tag only) | ||
548 | // - this might or might not need to take uncompression into account | 548 | // - this might or might not need to take uncompression into account | ||
549 | // FIXME: for updates, we might need to force an overwrite (that is, deleting before) | 549 | // FIXME: for updates, we might need to force an overwrite (that is, deleting before) | ||
550 | QFile file(payloadfile); | 550 | QFile file(payloadfile); | ||
551 | bool success = true; | 551 | bool success = true; | ||
552 | const bool update = ((entry.status() == KNS3::Entry::Updateable) || (entry.status() == KNS3::Entry::Updating)); | 552 | const bool update = ((entry.status() == KNS3::Entry::Updateable) || (entry.status() == KNS3::Entry::Updating)); | ||
553 | 553 | | |||
554 | if (QFile::exists(installpath)) { | 554 | if (QFile::exists(installpath) && QDir::tempPath() != installdir) { | ||
555 | if (!update) { | 555 | if (!update) { | ||
556 | Question question(Question::ContinueCancelQuestion); | 556 | Question question(Question::ContinueCancelQuestion); | ||
557 | question.setQuestion(i18n("Overwrite existing file?") + "\n'" + installpath + '\''); | 557 | question.setQuestion(i18n("Overwrite existing file?") + "\n'" + installpath + '\''); | ||
558 | question.setTitle(i18n("Download File")); | 558 | question.setTitle(i18n("Download File")); | ||
559 | if(question.ask() != Question::ContinueResponse) { | 559 | if(question.ask() != Question::ContinueResponse) { | ||
560 | return QStringList(); | 560 | return QStringList(); | ||
561 | } | 561 | } | ||
562 | } | 562 | } | ||
▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines |