| Summary: | Eclipse deletes all files when I cancel a project creation (symlink in project location path) | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Mateus Krepsky Ludwich <mkludwich> |
| Component: | UI | Assignee: | Markus Keller <markus.kell.r> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | amj87.iitr, daniel_megert, markus.kell.r, pommessemmel, remy.suen, sampepping |
| Version: | 3.5.2 | Flags: | daniel_megert:
review+
|
| Target Milestone: | 3.8.2 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Bug Depends on: | 233019 | ||
| Bug Blocks: | |||
Jay, please investigate. Thanks. Can you please give me the complete build ID (with 'I', 'M' etc) or the build name? From the steps you have given, I see that this is one of the older builds. I would recommend that you use a newer, if possible latest, build and see if you still get this problem. In the newer builds, the UI has changed bit around that use-case. (In reply to comment #2) > Can you please give me the complete build ID (with 'I', 'M' etc) or the build > name? > > From the steps you have given, I see that this is one of the older builds. I > would recommend that you use a newer, if possible latest, build and see if you > still get this problem. In the newer builds, the UI has changed bit around that > use-case. Hi, I don't see any character ('I' or 'M', etc) in the build ID. I just get this: Eclipse IDE for Java Developers Version: 1.2.2.20100216-1730 Build id: 20100218-1602 BTW, I'm using Eclipse Galileo (eclipse-java-galileo-SR2-linux-gtk.tar.gz) if it helps. Oh, I discovered something new: depending on the files that prj_it/bin contains, the message: "The output folder has changed. Do you want to remove the old location 'prj_it/bin' and its content?", described in step number 5, does not appear. But, eclipse still delete my files after I click on "Back" button (as described by step number 7). Again, this only occurs when I select the symbolic link prj_it as the path to the project. I tried the reproduce the bug using Eclipse Helios (eclipse-java-helios-linux-gtk.tar.gz), Eclipse IDE for Java Developers Version: 1.3.0.20100617-0520 Build id: 20100617-1415. And the bug still occurs! I putted some screen shots here: http://www.inf.ufsc.br/~ludwich/eclipse/ with the steps to reproduce the bug. I experience the same problem, now twice accidentally, and I can repeat it easily. Steps to repeat: Directory /source/bbb contains >ls -a . .. bin .classpath docs .project src (.classpath and .project come from copying from another eclipse project) >ls docs PRV05-2500.xml waarnemingen.dtd waarnemingen.xquery~ PRV05-2600.xml waarnemingen.xquery File | New Java Project fill in project name; uncheck 'Use default location'; browse; select /source/bbb; Next Cancel >ls -a . .. bin .classpath docs .project src >ls docs All content in docs (and bin and src) has been wiped out. Platform: Debian Linux testing. Eclipse: installed from Galileo SR1, updated several times, now to Helios. Version: Helios Release Build id: 20100618-0524 *** System properties: eclipse.application=org.eclipse.ui.ide.workbench eclipse.buildId=I20100608-0911 eclipse.commands=-os linux -ws gtk -arch x86 -showsplash /fsb/local/eclipse//plugins/org.eclipse.platform_3.6.0.v201006080911/splash.bmp -launcher /fsb/local/eclipse/eclipse -name Eclipse --launcher.library /fsb/local/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.0.v20100503/eclipse_1307.so -startup /fsb/local/eclipse//plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -product org.eclipse.epp.package.java.product -vm /usr/lib/jvm/java-6-sun-1.6.0.21/jre/bin/../lib/i386/client/libjvm.so This happened once before the upgrade to Helios, and once after. It can be repeated easily, but not always. It seems that if the name of the directory has been used earlier to register a project (cancelled or not), the contents of the subdirectories are not deleted. This is a highly critical bug, because it does not concern eclipse functionality, but the deletion of user content. If the new project is a git working directory, the whole history of the project contained in the .git subdirectory is wiped out. Shudder. *** Bug 393796 has been marked as a duplicate of this bug. *** Reproduced in master with the steps from comment 0. The crucial point is to create the project outside of the workspace at location /home/mateus/prj_it , which is a symbolic link to /home/mateus/dev/prj_it The problem is that NewJavaProjectWizardPageTwo#rememberExisitingFolders(URI) operates on the original location, but #restoreExistingFolders(URI) gets the resolved location that includes "dev/". On cancel, that method doesn't find the original folders any more. It wrongly assumes the existing folders have been created in the wizard and then goes and deletes them. The symlink in the project location gets resolved in Project#create(..) via FileUtil.canonicalURI(..). This behavior is unspecified, see bug 233019. Released workaround to master: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=a0d2d3a64f310e7775834de993b511bac2dd2a99 Unless bug 233019 gets fixed for 4.2.2, we should backport this. Looking at the history of bug 233019, I doubt this will be addressed for 4.2.2. Dani, OK for 3.8.2? (In reply to comment #8) > Looking at the history of bug 233019, I doubt this will be addressed for > 4.2.2. > Dani, OK for 3.8.2? Yes, looks good except for the copyright date. And make sure to increase the bundle version. Fixed in R3_8_maintenance with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=41847ed0d7c8e05c5db320255499b65c82f006ad Verified in 3.8-M20130116-1030 and 4.2-M20130116-1800 on Ubuntu and Windows 7. We also verified that it works using junctions and symbolic links under Windows and that it also worked there before this fix was applied. |
Build Identifier: 20100218-1602 There were a directory (named "prj_it") which had the following structure: aub_o/ bin/ KNF/ src/ The path for prj_it in my file system is: /home/mateus/dev/prj_it In /home/mateus there is also a symbolic link (named "prj_it") that points to dev/prj_it I tried to create a new Java project, using "prj_it" as base. ("Create project from existing source") I selected the symbolic link prj_it (/home/mateus/prj_it) as the path to the project. It appears the message: "The output folder has changed. Do you want to remove the old location 'prj_it/bin' and its content?" So I selected to cancel and I clicked in the "Back" button. Then all files in all subdirectories of prj_it were gone! The subdirectories (aub_o, bin, KNF, and src) are still there, but now they are empty. If I select the complete path (/home/mateus/dev/prj_it) instead of the symbolic link, that error does not happen. Reproducible: Always Steps to Reproduce: 1. Click on menu File -> New -> Java Project 2. Select the option "Create project from existing source" 3. Click on "Browse" button 4. Select a symbolic link that points to the desired directory and click on "OK" button 5. Click on "Next >" button It will appear the message: "The output folder has changed. Do you want to remove the old location 'prj_it/bin' and its content?" 6. Click on "Cancel" button 7. Click on "< Back" button