Bug 341479 - Wrong file paths when having partially common paths (but not equal)
Summary: Wrong file paths when having partially common paths (but not equal)
Status: CONFIRMED
Alias: None
Product: kompare
Classification: Applications
Component: parser (show other bugs)
Version: 4.1.1
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Kompare developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-02 08:09 UTC by hardmooth
Modified: 2019-08-06 11:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Folder structure reproducing the error (647 bytes, application/x-gzip)
2014-12-03 08:34 UTC, hardmooth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hardmooth 2014-12-02 08:09:11 UTC
Kompare sometimes parses file paths incorrectly.
This happens if two files have partially common paths, like:
> common/path_A/sub_folder/file.ext
> common/sub_folder/file.ext
Kompare will then place both files into
> common/path_A/sub_folder/file.ext
A diff file as minimal non-working example can be found below.

==START_OF_DIFF_FILE==
diff --git a/common/path_A/sub_folder/file.ext b/common/path_A/sub_folder/file.ext
index f01e304..20f7773 100644
--- a/common/path_A/sub_folder/file.ext
+++ b/common/path_A/sub_folder/file.ext
@@ -1,6 +1,10 @@
-something left
+something right
 
 if(ORACLE_FOUND)
 
diff --git a/common/sub_folder/file.ext b/common/sub_folder/file.ext
index 6e32be5..9559da0 100644
--- a/common/sub_folder/file.ext
+++ b/common/sub_folder/file.ext
@@ -1,23 +1,27 @@
 # vim: ts=4:sw=4:cindent:expandtab
 
-something different left
+something different right
==END_OF_DIFF_FILE==

Reproducible: Always

Steps to Reproduce:
1. either open diff file from bash or compare two directories (as decribed in "Details)


Actual Results:  
Kompare will place both files 'file.ext' into 
> common/path_A/sub_folder/file.ext
and none into 
> common/sub_folder/file.ext


Expected Results:  
The two files should be (one each) in 
> common/path_A/sub_folder/file.ext
> common/sub_folder/file.ext
Comment 1 hardmooth 2014-12-03 08:34:43 UTC
Created attachment 89821 [details]
Folder structure reproducing the error

As a side notice:
The same error can be produced directly comparing two directories in the above described structure (see compressed folder)