Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338792

Summary: AliasManager compare method does not check host names of uri
Product: [Eclipse Project] Platform Reporter: Martin Tauber <martin.tauber>
Component: ResourcesAssignee: Szymon Ptaszkiewicz <sptaszkiewicz>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: mober.at+eclipse, sptaszkiewicz
Version: 3.6.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
proposed patch
sptaszkiewicz: iplog+
Patch with test none

Description Martin Tauber CLA 2011-03-03 07:26:15 EST
Build Identifier: 20100917-0705

The AliasManager of the workspace does not check host names in the compare method.

I am using RSE to link remote file systems into my workspace. The remote filesystems look very much alike - most of the resources have the same paths e.g: hosta:/abc/def and hostb:/abc/def The AliasManager does not distinguish between these files, since it ignores the host. This results in strange behaviour. Files which are in fact on the first server suddenly occure on the second server in the package explorer view of the eclipse. Eclipse sometimes complains about files which it can't find, since it looks for them on the wrong server.

Reproducible: Always

Steps to Reproduce:
1. create a directory on host A (mkdir /user/martin/abc)
2. add a file to that directory (touch /user/martin/abc/A)
3. create a directory on host B which has exactly the same path
4. add a file to that directory with a different name to the first one (touch /user/martin/B)
5. open an fresh eclipse instance which uses RSE
6. create a project hosta
7. create a linked directory dira which links to the RSE filesystem on hosta (/user/martin/abc)
8. create a project hostb
9. create a linked directory dirb which links to the RSE filesystem on hostb (/user/martin/abc)
10. Open the package explorer and browse the workspace. The files are not where you would expect them to be.
Comment 1 Martin Tauber CLA 2011-03-03 08:16:35 EST
Created attachment 190259 [details]
proposed patch

proposed patch
Comment 2 Szymon Ptaszkiewicz CLA 2012-03-09 07:42:11 EST
Comment on attachment 190259 [details]
proposed patch

Thanks, Martin. The patch looks good.
Comment 3 Szymon Ptaszkiewicz CLA 2012-03-09 09:16:43 EST
Created attachment 212383 [details]
Patch with test
Comment 4 Szymon Ptaszkiewicz CLA 2012-03-12 10:34:25 EDT
It turned out to be a specific case of bug 192631.

*** This bug has been marked as a duplicate of bug 192631 ***