Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 393796 - Dangerous file deletion on abort of 'New Project'
Summary: Dangerous file deletion on abort of 'New Project'
Status: CLOSED DUPLICATE of bug 319054
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.8   Edit
Hardware: PC Linux Qt
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-07 12:43 EST by Jonathan Enders CLA
Modified: 2012-11-08 05:30 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Enders CLA 2012-11-07 12:43:09 EST
Eclipse just deleted all of my Java Projects including my Backup folder and repositories. :(

I had all my Projects (and the BACKUP folder) contained in a folder named Java outside my workspace (because of git). For every project I had an own repository located within the project folder.

My files were deleted as I did the following:

-create a new project using: File -> New -> Project...
-in the wizard select 'Java Project'
-deselect 'use default location' and Browse for the folder /....../Java
-enter Project name: 'Graph'
-click Next
-now I realized that eclipse didn't create the folder Graph but instead created the project files in my Java folder so I hit 
-Cancel

now everything in my Java folder got deleted. Isn't that smart!

I redid the upper steps and sure as * it did it again.

From a professional ide like eclipse I expected a lot more sophistication. Like not deleting files that it didn't create or something like that. And it didn't just move the files to the trash or something that would be recoverable, no. Everything is gone. :(

plugins: Vrapper, EGit
Comment 1 Jonathan Enders CLA 2012-11-07 12:56:08 EST
One thing I should add is, that it didn't remove the 21 folders I had in the folder Java, but all of the content within these folders. So if you want to test the behaviour you have to create a folder in the folder Java and a file within that folder. If you pick the Java folder in the Location field of the 'nre project' dialog the file will be deleted.
Comment 2 Jonathan Enders CLA 2012-11-07 13:05:34 EST
Also I used the option 'Create separate folders for sources and class files'
Comment 3 Dani Megert CLA 2012-11-08 05:29:38 EST
Sorry, that's really bad and should not happen.

I need some more info, since I cannot yet reproduce it (on Windows).

- When you select the folder 'Java', do you select the real physical folder
  or do you select a symbolic link that points to it or is a symbolic
  link part of the path?

- How do you 'Cancel'? I assume by clicking on the button.

- Were the folders already there before you started to create the project?
  From the code I see that it deletes stuff which is added while the wizard
  is open (also bad of course).
Comment 4 Dani Megert CLA 2012-11-08 05:30:51 EST

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