--- fpicker/source/unx/kde/kdefilepicker.cxx	2007-07-03 17:16:36.000000000 +0200
+++ fpicker/source/unx/kde/kdefilepicker.cxx	2007-07-03 19:32:57.000000000 +0200
@@ -352,13 +328,14 @@ void FileDialog::customEvent( QCustomEve
 
                         if ( isSave() && result() == QDialog::Accepted )
                         {
-                            if ( qSelectedURL.startsWith( "file:" ) )
+                            if ( qProtocol == "file" )
                             {
+                                QString qFileName( qLocalSelectedURL.path() );
                                 bCanExit =
-                                    !QFile::exists( qSelectedURL.mid( 5 ) ) ||
+                                    !QFile::exists( qFileName ) ||
                                     ( KMessageBox::warningYesNo( 0,
                                                                  i18n( "A file named \"%1\" already exists. "
-                                                                     "Are you sure you want to overwrite it?" ).arg( qSelectedURL ),
+                                                                     "Are you sure you want to overwrite it?" ).arg( qFileName ),
                                                                  i18n( "Overwrite File?" ),
                                                                  i18n( "Overwrite" ), KStdGuiItem::cancel() ) == KMessageBox::Yes );
                             }
