Bug 139233 - kompare does not understand directory structures
Summary: kompare does not understand directory structures
Status: RESOLVED FIXED
Alias: None
Product: kompare
Classification: Applications
Component: navigationpart (show other bugs)
Version: 3.4
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
: 159939 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-26 14:12 UTC by esigra
Modified: 2009-03-11 22:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description esigra 2006-12-26 14:12:52 UTC
Version:           3.4 (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
OS:                Linux

Kompare does not understand directory structures. Reproduce with the following script:
#! /bin/sh
mkdir kompare-directory-bug     && \
cd kompare-directory-bug        && \
mkdir -p tree1/A                && \
mkdir -p tree1/B                && \
mkdir -p tree2/A                && \
mkdir -p tree2/B                && \
echo asdf > tree1/A/file        && \
echo qwer > tree1/B/file        && \
echo asef > tree2/A/file        && \
echo qwdr > tree2/B/file        && \
diff -rU2 tree1 tree2|kompare -
cd ../kompare-directory-bug/..  && \
rm -r kompare-directory-bug


Kompare shows:
Source Folder    Destination Folder
[ ]tree1/A/      [ ]tree2/A/
 └─[ ]tree1/      └─[ ]tree2/
    └─[ ]B/          └─[]B/

Expected:
Source Folder    Destination Folder
[ ]tree1/        [ ]tree2/
 ├─[ ]A/          ├─[ ]A/
 └─[ ]B/          └─[ ]B/
Comment 1 kde 2007-06-16 19:00:32 UTC
I can confirm this on Ubuntu 7.04/Feisty with KDE 3.5.6, Kompare 3.4
Comment 2 kde 2007-06-16 19:01:10 UTC
*** This bug has been confirmed by popular vote. ***
Comment 3 esigra 2008-02-25 15:01:46 UTC
Just a guess; is the bug in kompare.h, constructRelativePath, where the comment says "Find a common root."? At least that comment sounds like it could have something to do with the faulty behaviour.
Comment 4 Kevin Kofler 2008-03-27 09:14:51 UTC
*** Bug 159939 has been marked as a duplicate of this bug. ***
Comment 5 Otto Bruggeman 2009-03-11 22:37:28 UTC
Should be fixed in 4.2.1 and higher.