mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
Temporary fix for PR 39061: Attach source does not work for applications compiled in CygWin.
This commit is contained in:
parent
05fddd74ed
commit
6e4db834c0
2 changed files with 17 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
2003-10-17 Mikhail Khodjaiants
|
||||
Temporary fix for PR 39061: Attach source does not work for applications compiled in CygWin.
|
||||
* CDirectorySourceLocation.java
|
||||
|
||||
2003-10-16 Mikhail Khodjaiants
|
||||
Fix for PR 38468: Error in files location.
|
||||
Use the 'getCanonicalPath' method of the 'File' class to obtain the file name.
|
||||
|
|
|
@ -85,15 +85,25 @@ public class CDirectorySourceLocation implements IDirectorySourceLocation
|
|||
*/
|
||||
public Object findSourceElement( String name ) throws CoreException
|
||||
{
|
||||
Object result = null;
|
||||
if ( getDirectory() != null )
|
||||
{
|
||||
File file = new File( name );
|
||||
if ( file.isAbsolute() )
|
||||
return findFileByAbsolutePath( name );
|
||||
result = findFileByAbsolutePath( name );
|
||||
else
|
||||
return findFileByRelativePath( name );
|
||||
result = findFileByRelativePath( name );
|
||||
if ( result == null && getAssociation() != null )
|
||||
{
|
||||
IPath path = new Path( name );
|
||||
if ( path.segmentCount() > 1 && getAssociation().isPrefixOf( path ) )
|
||||
{
|
||||
path = getDirectory().append( path.removeFirstSegments( getAssociation().segmentCount() ) );
|
||||
result = findFileByAbsolutePath( path.toOSString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return result;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
Loading…
Add table
Reference in a new issue