Summary: | Export won't overwrite existing files; doesn't prompt | ||
---|---|---|---|
Product: | [Applications] kwalletmanager | Reporter: | Tristan Miller <psychonaut> |
Component: | general | Assignee: | George Staikos <staikos> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Tristan Miller
2006-03-02 00:59:32 UTC
I can confirm using KDE 3.5.3 from debian packages. This does also happen when using "Save as.." instead of export. SVN commit 566720 by staikos: prompt and allow overwrite can someone forward port this to trunk? BUG: 122946 M +10 -1 kwalleteditor.cpp --- branches/KDE/3.5/kdeutils/kwallet/kwalleteditor.cpp #566719:566720 @@ -1104,7 +1104,16 @@ KURL url = KFileDialog::getSaveURL(QString::null, "*.xml", this); if (!url.isEmpty()) { - KIO::NetAccess::file_copy(tf.name(), url, 0600, false, false, this); + bool ok = true; + if (KIO::NetAccess::exists(url, false, this)) { + int rc = KMessageBox::warningContinueCancel(this, i18n("The file '%1' already exists. Would you like to overwrite this file?").arg(url.prettyURL()), i18n("Overwrite")); + if (rc == KMessageBox::Cancel) { + ok = false; + } + } + if (ok) { + KIO::NetAccess::file_copy(tf.name(), url, 0600, true, false, this); + } } } |