Version: (using KDE 4.4.3) Compiler: MSVC 9.0 OS: MS Windows Installed from: Compiled From Sources On MS Windows, when comparing two files that are residing on different drive letters, Kompare falls into an infinite loop after selecting the "Save diff" option. The reason for this problem is that Kompare tries to find a common root path for both files. On Unix there is always one common root for all files, while on MS Windows this is not the case. Kompare will try to walk up the path, but once it hits the root directory of a drive, it won't detect, that it can't go any further and will keep trying.
Created attachment 43745 [details] Proposed patch The patch fixes the problem, although it's not necessarily a clean solution. An ideal fix would involve adding something like KUrl::isTopLevel() and making use of it here.
Your diff is reversed, but otherwise looks OK.
It was created with the patched Kompare itself :) I've found a similar bug in KDirSelectDialog::Private::slotComboTextChanged(), but there is more mess in there and it's a subject for another PR.
> It was created with the patched Kompare itself :) Try File / Swap source and destination. :-) But I guess that's for next time, we can work with the reversed patch just fine (that's what patch has a -R option for).
Git commit fd2d6e32dfa724f0b2fcffe4766d2d7faf84d437 by Patrick Spendrin. Committed on 02/05/2013 at 13:34. Pushed by sengels into branch 'kde-4.10'. fix endless loop patch taken from bugreport and will be committed asap. M +1 -0 portage/kde/kdesdk/kompare/kompare-20130225.py A +19 -0 portage/kde/kdesdk/kompare/kompare-4.10.2-20130502.diff http://commits.kde.org/emerge/fd2d6e32dfa724f0b2fcffe4766d2d7faf84d437
Git commit d05571620258b9714cbc338c5af6f4419cf601c3 by Patrick Spendrin. Committed on 10/05/2013 at 22:53. Pushed by sengels into branch 'KDE/4.10'. fix endless loop do not go into infinite loop in "save diff" M +2 -2 komparepart/komparesaveoptionswidget.cpp http://commits.kde.org/kompare/d05571620258b9714cbc338c5af6f4419cf601c3
Git commit 7ca56c747dbb135ad1f632fde3ceaba54cfff3b5 by Patrick Spendrin. Committed on 10/05/2013 at 22:53. Pushed by sengels into branch 'master'. fix endless loop do not go into infinite loop in "save diff" M +2 -2 komparepart/komparesaveoptionswidget.cpp http://commits.kde.org/kompare/7ca56c747dbb135ad1f632fde3ceaba54cfff3b5