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

Bug 153375

Summary: Creating a deep directory structure fails silently
Product: [Eclipse Project] Platform Reporter: Philippe Ombredanne <pombredanne>
Component: ResourcesAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: francois, kenny, Tsvetan.Stoyanov
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Philippe Ombredanne CLA 2006-08-09 22:48:52 EDT
Steps to reproduce:
create a simple project
for i=1 to (path is at least 250+ characters) 
   create a inside the last created dir with a long name (50 chars)
refresh the project
the last created folder "disappears" from the navigator
try do do anything of the created directory, and you get a popup "resource <blabla> is out of sync with the file system"

under the windows explorer, rename the first few root folder as "a" (ie a very short name)
repeat going down in the folder hierarchy four or five times
refesh the project again
the folders that were created reappear

So there is some weird interactions between the limitation of the Windows Api where there is some limitation ~250 chars when a non UTF api is used (if I recall) (for instance Windows Explorer is a good exmaple of that stupid limitation), and the Java capabilities (the core.filesystem uses Java mkdirs to create directories) which have no such limitations but instead use the full NTFS capabilities.


IMHO, there should be either :
- some way for a user not to get in that mess
- some way to handle that gracefully
Comment 1 Philippe Ombredanne CLA 2006-08-10 15:39:23 EDT
Note that there are known JDK issues at play there...
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4403166

and a related albeit different bugs here:
bug 69620
bug 30995

and the whole explanantion here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp

I would assume that core.filesystem's local file implementation could have the opportunity to fix that 
Comment 2 John Arthorne CLA 2006-11-20 13:09:13 EST
*** Bug 165130 has been marked as a duplicate of this bug. ***
Comment 3 John Arthorne CLA 2006-11-20 15:04:37 EST
Realized that this is also a duplicate.

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

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