Xander
Xander

Reputation: 5597

Eclipse made files empty

Just about an hour ago, I decided to switch my workspace folder in eclipse. So I created a new folder, moved all project folders to the new workspace folder and set this folder as the workspace folder in eclipse. Obviously, I had to re-import the projects, so I clicked import, selected the project and unchecked the copy to workspace checkbox because they were already in my workspace, but this gave me an error. So I tried again now checking the copy to workspace checkbox (I thought it could do no harm) and I didn't get an error. However, when my workspace loaded I got a lot of error and I noticed that eclipse had emptied all my project files! All files were still there, but all the data was gone: the files were 0 bytes. I do have a back-up from most of my projects, but there's one project I hadn't backed up yet, so my question is: is there any way to recover the projects?

Upvotes: 2

Views: 814

Answers (2)

greg-449
greg-449

Reputation: 111217

Right click on the Project and select Restore from Local History.... Eclipse will show you any backups it has of the project files.

Upvotes: 1

Gladhus
Gladhus

Reputation: 918

I doubt it... My guess is Eclipse tried to copy the projects from and to the same folder, so it started by creating the folders, which replaced the existing ones with the new (empty) ones. Try looking into your bin, but I doubt there's a way to recover them without the use of a special recovery tool. I've never tried any personally, but that's your best chance IMO.

Upvotes: 2

Related Questions