Version: 3.3 (using KDE 3.3.0, SuSE) Compiler: gcc version 3.3.3 (SuSE Linux) OS: Linux (i686) release 2.6.5-7.108-default I'm comparing two directories: Source: /home/username/hosted/web/ Dest: /home/username/hosted_sites/web/sp/ If I merge a difference from the source to destination file then attempt to save, I get the following error: Could not upload the temporary file to the destination location <b>/home/username/hosted/web/</b>. The temporary file is still available under: <b>/tmp/kde-username/kompare4VWGia.tmp</b>. You can manually copy it to the right place. If I attempt to compare two files in the same directory however (say /home/username/hosted/web/version1.html and /home/username/hosted/web/version2.html), I do not get this error. Nothing is printed to stdout or stderr when I get the dialog.
To narrow things down a bit more... The bug happens when two directories are compared instead of two files. It appears that kompare is trying to save the file to the _directory_ being compared, not the _file_ being compared. So if I use: Source: /home/username/hosted/web/version.html Dest: /home/username/hosted_sites/web/sp/version.html things work. This kinda defeats kompare's nice file-iteration interface, of course.
Getting even more specific (won't... sleep... until... fixed... <collapses>) The bug is in komparemodellist.cpp line 362: result = KIO::NetAccess::mkdir( KURL( destination ).path(), (QWidget*)parent() ); So if the directory already exists then things bomb. The best thing would be to detect the presence of the directory, then create it if it doesn't exist. Then bomb upon failure. I tried to see if this is fixed in CVS, but ViewCVS for KDE seems to be busted.
I screwed up on the commit message... ---------- Forwarded Message ---------- Subject: kdesdk/kompare/libdiff2 Date: Saturday 11 September 2004 22:33 From: Otto Bruggeman <bruggie@home.nl> To: kde-cvs@kde.org Cc: 89015-done@bugs.kde.org CVS commit by bruggie: Test if the directory exists before trying to create it. This should fix bug 89105. Can you test this version (i'll backport to the 3.3.x branch in a few minutes) ? CCMAIL: 89015-done@bugs.kde.org M +8 -4 komparemodellist.cpp 1.81 --- kdesdk/kompare/libdiff2/komparemodellist.cpp #1.80:1.81 @@ -359,4 +359,7 @@ bool KompareModelList::saveDestination( kdDebug(8101) << "Tempfilename : " << temp->name() << endl; kdDebug(8101) << "DestinationURL : " << destination << endl; + KIO::UDSEntry entry; + if ( !KIO::NetAccess::stat( KURL( destination ).path(), entry, (QWidget*)parent() ) ) + { result = KIO::NetAccess::mkdir( KURL( destination ).path(), (QWidget*)parent() ); if ( !result ) @@ -365,4 +368,5 @@ bool KompareModelList::saveDestination( return false; } + } result = KIO::NetAccess::upload( temp->name(), KURL( destination ), (QWidget*)parent() ); } -------------------------------------------------------
Looks good.
I'm using Kompare 3.4.1 and I get this error using svn diff | kompare - There are diffs for 3 files, which are displayed correctly in the lower pane: ./Jamroot ./utility/constants.hpp ./dna/Jamfile The source and destination folders are incorrectly displayed in the tree: utility/Jamroot utility/constants.hpp utility/dna/Jamfile I suspect that the bogus source/destination folder trees are used to write back instead of the separate mechanism that the lower pane is using to (correctly) read the full contents of the original files. Hence, hitting save gives me "Could not upload the temporary file to the destination location". As a troubleshooting note, it would be good for the error to indicate exactly where it is trying to write the file, since this has come back before.
This issue also occurs under kdesvn 3.5.6 with Kompare 3.4.