Community
Participate
Working Groups
PRODUCT VERSION: Test on 135 and 137 on Windows. DESCRIPTION: This one is high priority, since the customer's data is destroyed. Here are the steps to reproduce it: 1) In the file system, create a folder c:\temp\test 2) Put 2 files in that folder, and make one of them read-only. I created rw.txt, and ro.txt and I made ro.txt file read-only. 3) In Eclipse, create a Simple Project called SimpleProject. When you create it, don't use the default location, but instead point it to c:\temp\test 4) You see both files in the Workbench 5) Delete the SimpleProject. When asked, "Delete all its contents under c:\temp\test as well?" say No. 6) Then you see a message "ro.txt is read only. Do you wish to delete it?" --- you think, this is strange since I just said I don't want any file to be deleted, but you play along and you answer No. 7) If you look in the file system you will see that c:\temp\test\rw.txt is GONE -- even though the use said NOT to delete any files. NOTES:
PAULACOX - 10/12/2001: FYI...We are able to recreate the problem when using the default directory too.
I found the same behaviour on 0.202a. All comments below are based on this build. Please inform if behaviour in UI in this situation has significantly changed between 0.137 and 0.202a. I traced the code in org.eclipse.ui.actions.DeleteResourceAction. When you have a project which contains no read-only files, then the ReadOnlyStatChecker returns the project itself as the "resource to delete", and then the IProject API is called, the project is deleted, and the contents are left on disk as requested by the user. If your project contains a read-only file, then the ReadOnlyStateChecker returns all non-r/o resources within that project as the list of "resources to delete". Then the IResource#delete API is called and each resource is deleted, even though you said don't delete the project contents. Moving bug to Platform/UI for investigation/comment.
Fixed DeleteResourceAction to not check for R/O files if it is not going to delete project contents.Released in 2.0 stream Will need to create a 1.0 build submission with this fix.
Bug 4938 Deleting Project with Read-only files will cause non-readonly files to be erased if user said to NOT erase them (1GLG2WT) Testing this fix I discovered another problem case 1) Create a project with one folder and one file. 2) Now create a file in the folder and makeit read only 3) Delete the project, say yes to delete content 4) When asked to delete the RO file pick cancel 5) The other file is deleted (even though you chose cancel) Fixed in DeleteResourceAction and ReadOnlyStateChecker in 2.0 stream
Nick and I created a version v138 of our org.eclipse.ui project (based on v137a) with the above fixes and changed the plugin version number in the plugin.xml file to 1.0.1
PRODUCT VERSION: Test on 135 and 137 on Windows.
*** Bug 5259 has been marked as a duplicate of this bug. ***
Randy, please verify in the latest 2.0 builds.
Verified