<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>238297</bug_id>
          
          <creation_ts>2010-05-20 14:52:33 +0000</creation_ts>
          <short_desc>Infinite loop in &quot;Save diff&quot; when compared files are on different drive letters</short_desc>
          <delta_ts>2013-05-11 00:36:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kompare</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Microsoft Windows</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Krzysztof Nowicki">krissn</reporter>
          <assigned_to name="KDE-Windows">windows-bugs-null</assigned_to>
          <cc>ps_ml</cc>
          
          <cf_commitlink>http://commits.kde.org/kompare/7ca56c747dbb135ad1f632fde3ceaba54cfff3b5</cf_commitlink>
          <cf_versionfixedin>4.10.4</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>964684</commentid>
    <comment_count>0</comment_count>
    <who name="Krzysztof Nowicki">krissn</who>
    <bug_when>2010-05-20 14:52:33 +0000</bug_when>
    <thetext>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 &quot;Save diff&quot; 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&apos;t detect, that it can&apos;t go any further and will keep trying.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>964687</commentid>
    <comment_count>1</comment_count>
      <attachid>43745</attachid>
    <who name="Krzysztof Nowicki">krissn</who>
    <bug_when>2010-05-20 14:59:44 +0000</bug_when>
    <thetext>Created attachment 43745
Proposed patch

The patch fixes the problem, although it&apos;s not necessarily a clean solution. An ideal fix would involve adding something like KUrl::isTopLevel() and making use of it here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>964791</commentid>
    <comment_count>2</comment_count>
    <who name="Kevin Kofler">kevin.kofler</who>
    <bug_when>2010-05-20 19:03:49 +0000</bug_when>
    <thetext>Your diff is reversed, but otherwise looks OK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>964805</commentid>
    <comment_count>3</comment_count>
    <who name="Krzysztof Nowicki">krissn</who>
    <bug_when>2010-05-20 19:29:15 +0000</bug_when>
    <thetext>It was created with the patched Kompare itself :)

I&apos;ve found a similar bug in KDirSelectDialog::Private::slotComboTextChanged(), but there is more mess in there and it&apos;s a subject for another PR.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>964825</commentid>
    <comment_count>4</comment_count>
    <who name="Kevin Kofler">kevin.kofler</who>
    <bug_when>2010-05-20 19:50:34 +0000</bug_when>
    <thetext>&gt; It was created with the patched Kompare itself :)

Try File / Swap source and destination. :-)

But I guess that&apos;s for next time, we can work with the reversed patch just fine (that&apos;s what patch has a -R option for).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1365848</commentid>
    <comment_count>5</comment_count>
    <who name="Patrick Spendrin">ps_ml</who>
    <bug_when>2013-05-02 19:54:39 +0000</bug_when>
    <thetext>Git commit fd2d6e32dfa724f0b2fcffe4766d2d7faf84d437 by Patrick Spendrin.
Committed on 02/05/2013 at 13:34.
Pushed by sengels into branch &apos;kde-4.10&apos;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1367908</commentid>
    <comment_count>6</comment_count>
    <who name="Patrick Spendrin">ps_ml</who>
    <bug_when>2013-05-10 20:54:52 +0000</bug_when>
    <thetext>Git commit d05571620258b9714cbc338c5af6f4419cf601c3 by Patrick Spendrin.
Committed on 10/05/2013 at 22:53.
Pushed by sengels into branch &apos;KDE/4.10&apos;.

fix endless loop

do not go into infinite loop in &quot;save diff&quot;

M  +2    -2    komparepart/komparesaveoptionswidget.cpp

http://commits.kde.org/kompare/d05571620258b9714cbc338c5af6f4419cf601c3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1367910</commentid>
    <comment_count>7</comment_count>
    <who name="Patrick Spendrin">ps_ml</who>
    <bug_when>2013-05-10 20:58:56 +0000</bug_when>
    <thetext>Git commit 7ca56c747dbb135ad1f632fde3ceaba54cfff3b5 by Patrick Spendrin.
Committed on 10/05/2013 at 22:53.
Pushed by sengels into branch &apos;master&apos;.

fix endless loop

do not go into infinite loop in &quot;save diff&quot;

M  +2    -2    komparepart/komparesaveoptionswidget.cpp

http://commits.kde.org/kompare/7ca56c747dbb135ad1f632fde3ceaba54cfff3b5</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>43745</attachid>
            <date>2010-05-20 14:59:44 +0000</date>
            <delta_ts>2010-05-20 14:59:44 +0000</delta_ts>
            <desc>Proposed patch</desc>
            <filename>kompare-4.4.3-savediff-win32.patch</filename>
            <type>text/plain</type>
            <size>705</size>
            <attacher name="Krzysztof Nowicki">krissn</attacher>
            
              <data encoding="base64">LS0tIGtvbXBhcmUva29tcGFyZXBhcnQva29tcGFyZXNhdmVvcHRpb25zd2lkZ2V0LmNwcAkyMDEw
LTA1LTIwIDE0OjI4OjI5LjEzODE4MTkwMCArMDIwMA0KKysrIGtvbXBhcmUva29tcGFyZXBhcnQv
a29tcGFyZXNhdmVvcHRpb25zd2lkZ2V0LmNwcC5vbGQJMjAwOS0wMy0yNyAxNDo0Njo1OC4wMDAw
MDAwMDAgKzAxMDANCkBAIC00OCwxMyArNDgsMTMgQEANCiANCiAJLy8gRmluZCBhIGNvbW1vbiBy
b290Lg0KIAlLVXJsIHJvb3QoIHNvdXJjZVVSTCApOw0KLQl3aGlsZSggcm9vdC5pc1ZhbGlkKCkg
JiYgIXJvb3QuaXNQYXJlbnRPZiggZGVzdGluYXRpb25VUkwgKSAmJiAocm9vdCAhPSByb290LnVw
VXJsKCkpKSB7DQorCXdoaWxlKCByb290LmlzVmFsaWQoKSAmJiAhcm9vdC5pc1BhcmVudE9mKCBk
ZXN0aW5hdGlvblVSTCApICkgew0KIAkJcm9vdCA9IHJvb3QudXBVcmwoKTsNCiAJfQ0KIA0KIAkv
LyBJZiB3ZSBmb3VuZCBhIGNvbW1vbiByb290LCBjaGFuZ2UgdG8gdGhhdCBkaXJlY3RvcnkgYW5k
DQogCS8vIHN0cmlwIHRoZSBjb21tb24gcGFydCBmcm9tIHNvdXJjZSBhbmQgZGVzdGluYXRpb24u
DQotCWlmKCByb290LmlzVmFsaWQoKSAmJiAocm9vdCAhPSByb290LnVwVXJsKCkpKSB7DQorCWlm
KCByb290LmlzVmFsaWQoKSApIHsNCiAJCW1fZGlyZWN0b3J5UmVxdWVzdGVyLT5zZXRVcmwoIHJv
b3QudXJsKCkgKTsNCiAJfQ0KIA0K
</data>

          </attachment>
      

    </bug>

</bugzilla>