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

Bug 349928

Summary: [client][file] File contents lost on creation of another one with the same name
Product: [ECD] Orion Reporter: Pradyut Sarma <pradyutksarma>
Component: ClientAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: john.arthorne, simon_kaegi, Szymon.Brandys, tomasz.zarna
Version: 0.2Flags: simon_kaegi: review+
Target Milestone: 0.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Bug details. none

Description Pradyut Sarma CLA 2011-06-21 06:26:06 EDT
Build Identifier: M8

The Navigator allows me to create a file with a name similar to the name of a file  that already exists within the same folder in the Navigator. As a result, the contents of the already existing file is overwritten by the contents of newly created file which is EMPTY.
End Result: The contents of the older file is lost.

Ideally, I would expect such generic checks to go into the file client services.

I am marking the bug as critical since it results in the loss of data (file contents).

Reproducible: Always

Steps to Reproduce:
1. Create a file eg. file1.java under some folder in the Navigator and add some contents to it.
2. Create another file with the same name within the same folder.
3. The original file is overwritten.
Comment 1 Pradyut Sarma CLA 2011-06-21 06:26:38 EDT
Created attachment 198318 [details]
Bug details.
Comment 2 Simon Kaegi CLA 2011-06-21 13:58:50 EDT
We should do something pragmatic here for RC3. Data loss bugs are worthy.
Comment 3 John Arthorne CLA 2011-06-21 14:31:09 EDT
This was actually a client bug. Now fixed:

http://git.eclipse.org/c/e4/org.eclipse.orion.client.git/commit/?id=314057d58314bb10af8db6df3ec8a593fc53a5b7