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

Bug 323172

Summary: IResource.exists() may return bad value on case insensitive file systems
Product: [Eclipse Project] Platform Reporter: Kamil Fejfar <comediant>
Component: ResourcesAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kamil Fejfar CLA 2010-08-19 12:16:57 EDT
Build Identifier: M20100211-1343

The following code describes this situation:

IContainer parent = .....// existing folder
IResource res = parent.getFolder(new IPath("a")) // folder also exist, but its name is A
res.exists() will return false, which is bad on case insensitive file systems

Problem is that exists() at the end delegates to AbstractDataTreeNode and its indexOfChild(String) method is case sensitive even if the file system is not.

Reproducible: Always

Steps to Reproduce:
1. Try to create new folder in workspace using NewFolderDialog.
2. Enter existing folder name but with different case.
3. You will not get message that folder exists, because Folder.exists() returns false.
Comment 1 John Arthorne CLA 2010-08-20 14:39:24 EDT

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