[Bug 64481] classparser does not recognice links or rel. paths to sourcefiles outside project dir

Andreas Koepfle koepfle at ti.uni-mannheim.de
Mon Sep 22 21:22:04 UTC 2003

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
koepfle at ti.uni-mannheim.de changed:

           What    |Removed                     |Added
            Summary|classparser does not        |classparser does not
                   |recognice links to          |recognice links or rel.
                   |sourcefiles                 |paths to sourcefiles outside
                   |                            |project dir

------- Additional Comments From koepfle at ti.uni-mannheim.de  2003-09-22 21:21 -------
I've looked into this bug.  
In our projects it affects qmake projects, that have relative subdirs that 
don't sit below the project dir.  
(e.g. SUBDIRS=../libs/a ../libs/b project) 
The problem is the same in both cases: 
CppSupportPart::isValidSource uses canonical paths (i.e. absolute paths with 
resolved symlinks) to the source files but assumes that the source files have 
to be in a subdirectory below the current project dir.  
When looking for the files it takes the canonical path and removes the 
beginning of it up to the length of the current project dir path to get the 
relative path to the files. This only works if the file sits below the current 
project dir. 
Example for clarification: 
|--- file.h -> ../libs/file.h 
|--- file.h 
original file path: 
/home/user/project/file.h == /home/user/project/../libs/file.h 
canonical path with resolved symlink: 
project dir: 
assumed relative path to file (canonical path - project dir length): 
which of course doesn't exist. 
This bug affects all files that don't sit below the current project dir (i.e. 
have relative paths with ../ or symlinks). 
(I changed the Summary to reflect this) 
Do we need this check in isValidSource (as javasupport also doesn't check this 
and it's difficult to get this right - I have a quick workaround here for our 
../ subdir projects but to get the symlinks right is not as easy)! Roberto? 
The bug was also reported by somebody else on the kdevelop ML today so we 
should really get this fixed. 
It looks like a similar bug also prevents cvspart from working with these 

More information about the KDevelop-devel mailing list