Bug 3029 - Case sensitive and validity problems (1GDS96P)
Summary: Case sensitive and validity problems (1GDS96P)
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Rodrigo Peretti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:48 EDT by Rodrigo Peretti CLA
Modified: 2001-10-25 11:14 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rodrigo Peretti CLA 2001-10-10 22:48:08 EDT
We have many problems that occur because the workspace allows paths to contain
	almost any characters/words but the user's filesystem is more restrictive. This is a summary
	of our findings. See related PRs:
		1GBNKI6: ITPCORE:WINNT - workspace.validatePath: usage is painful 
		1FW87XF: ITPUI:WIN2000 - Can create 2 files with same name
		1GD9IXS: ITPCORE:ALL - make case insensitive depending on platform
		1FW8L5N: ITPUI:WIN2000 - Cannot create Project com2 when com exists
		1GD0JXR: ITPUI:WIN98 - Cannot open file with filename > about 220 chars

	1). Invalid characters in file names.
	2). File name case sensitivity.
	3). Reserved words in file names.
	4). File name length.
	5). File name segment depth.

NOTES:

--------------------------------------------
1). 

--------------------------------------------
2).

Notes from referenced PRs:

The problem might be solved if we are using force = false but with force = true it might be worse.
We could have two (or more) different files in the workspace writing to the same file in the file system.
(e.g. test.java and Test.java)

RefreshLocal is also affected. Need to decide if when refreshing a resource that has an existing
location on disk, we throw an exception to warn the user or simply ignore.

	Given the scenario:
		Workspace contains:
			Abc
		File system contains:
			Abc, xyz

	Usecases and expected behaviour (on a non case sensitive FS):
	1) Rename Abc to abc => OK
	2) Create ABC => FAIL
	3) Create XYZ => FAIL
	4) Rename (in FS) Abc to abc + Refresh Local => DELETE Abc + CREATE abc

Also:
	Potential problem areas:
	- property store
	- history store
	- persisted markers and sync info
	- resource lookup in the tree

--------------------------------------------
3).

Notes from referenced PRs:

The following directory names are not allowed by Win98 or WinNT:
	con, com1, com2, ..., com9, lpt1, lpt2, ..., lpt9.  
Checking for existence on these files always returns true.

--------------------------------------------
4).
--------------------------------------------
5).
--------------------------------------------

DJH (5/15/01 4:03:04 PM)

Action items/issues:

- UnifiedTree -> fix the merge code for workspace/filesystem resources
- how is #resourceFor affected by case-sensitivity on a case insensitive FS?
- create/move/copy -> existence checks
	- for example, for create:
		- create force false all the time and if there is a problem and force is true then
			check the names to see if we are ok
- case sensitivity information should be available on a per project basis since
	project content can occur across different filesystems.
- must be able to rename/change file casing (e.g. foo.java -> Foo.java)
- #setContents -> if someone changes the casing from underneath you, just set
	the content as per normal and the old resource will be removed/the new resource
	will be added during the next refresh local. Yes, this will be treated as an add/delete
	and remove properties, markers, etc.
- need a story for path validity. where does it happen? At the API level or below?

RTP (5/29/01 9:48:39 PM)

High priority:
	1) Need to be able to rename a resource changing only the case.
		1.1) Should handle using API and file system
	2) Create a resource (force TRUE) but a resource with different case exists on disk.
		The problem is to end up with two resources having the same location on disk.

Medium priority:
	1) Create a resource (force FALSE) but a resource with different case exists on disk.
		1.1) We should not create the resource and should find the existing one.
	2) Change a file case on disk and set the contents (keepHistory FALSE).
Comment 1 Rodrigo Peretti CLA 2001-10-22 12:24:36 EDT
The case sensitivity problem has already been fixed. There are some pending 
issues being addressed in bug 3041.
Closing.
Comment 2 DJ Houghton CLA 2001-10-24 06:41:32 EDT
PRODUCT VERSION:
	Eclipse 0.106

Comment 3 Rodrigo Peretti CLA 2001-10-25 11:14:25 EDT
Closed in v206.