summaryrefslogtreecommitdiff
path: root/graphics/kdegraphics3/patches/patch-aa
blob: cc733fa321a62d93e3e02fc5a0e94d5812b94cbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$NetBSD: patch-aa,v 1.10 2006/01/31 22:47:11 markd Exp $

--- kpdf/part.cpp.orig	2006-01-20 05:38:22.000000000 +1300
+++ kpdf/part.cpp
@@ -697,6 +697,11 @@ void Part::slotSaveFileAs()
     KURL saveURL = KFileDialog::getSaveURL( url().isLocalFile() ? url().url() : url().fileName(), QString::null, widget() );
     if ( saveURL.isValid() && !saveURL.isEmpty() )
     {
+	if (saveURL == url())
+	{
+		KMessageBox::information( widget(), i18n("You are trying to overwrite \"%1\" with itself. This is not allowed. Please save it in another location.").arg(saveURL.filename()) );
+		return;
+	}
         if ( KIO::NetAccess::exists( saveURL, false, widget() ) )
         {
             if (KMessageBox::warningContinueCancel( widget(), i18n("A file named \"%1\" already exists. Are you sure you want to overwrite it?").arg(saveURL.filename()), QString::null, i18n("Overwrite")) != KMessageBox::Continue)