[Bug 126870] New: kompare creates a new directory insteed of new file

Alex Kern alex.kern at gmx.de
Sun May 7 00:08:46 CEST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=126870         
           Summary: kompare creates a new directory insteed of new file
           Product: kompare
           Version: unspecified
          Platform: SuSE RPMs
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kompare-devel kde org
        ReportedBy: alex.kern gmx de


Version:            (using KDE KDE 3.5.2)
Installed from:    SuSE RPMs
OS:                Linux

here is the patch 

--- komparemodellist.cpp	2006-05-07 00:03:39.000000000 +0200
+++ komparemodellist.cpp.new	2006-05-07 00:03:20.000000000 +0200
 @ -361,9 +361,10  @
 		KIO::UDSEntry entry;
 		if ( !KIO::NetAccess::stat( KURL( destination ).path(), entry, (QWidget*)parent() ) )
 		{
-			if ( !KIO::NetAccess::mkdir( KURL( destination ).path(), (QWidget*)parent() ) )
+			if ( !KIO::NetAccess::stat( KURL( destination ).directory(), entry, (QWidget*)parent() ) &&
+				!KIO::NetAccess::mkdir( KURL( destination ).directory(), (QWidget*)parent() ) )
 			{
-				emit error( i18n( "<qt>Could not create destination directory <b>%1</b>.\nThe file has not been saved.</qt>" ) );
+				emit error( i18n( "<qt>Could not create destination directory <b>%1</b>.\nThe file has not been saved.</qt>" ).arg( KURL( destination ).directory() ) );
 				return false;
 			}
 		}
 @ -382,7 +383,7  @
 	}
 	else
 	{
-		//model->slotSetModified( false );
+		model->slotSetModified( false );
 		temp->unlink();
 		delete temp;
 	}


More information about the Kompare-devel mailing list