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

Bug 360000

Summary: Symbolic link deleted by accidentally deleting by trying to create a file with the same name
Product: [Eclipse Project] Platform Reporter: Chris McGee <cbmcgee>
Component: ResourcesAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: Dmitry_Karasik, remy.suen, Szymon.Brandys
Version: 3.5.2Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Chris McGee CLA 2011-10-05 10:59:13 EDT
I have a project on Linux with a symbolic link in it. Because the symbolic link is not visible when the target is missing they may try to recreate it as a regular file.

When this happens the new file wizard gives a confusing error (file not found). Also, the symbolic link is deleted from disk. If the user has not backed up their project or committed it to a an SCM system then this link is lost. It appears that because the symbolic link was never shown in my case it may not be restorable from local history either.

What I would expect is that the error message indicates that there is a file (symbolic link) on disk and that the new file has a conflicting name. Also, the symbolic link should not be deleted from disk even though its target does not exist.
Comment 1 Dmitry Karasik CLA 2011-10-05 13:47:03 EDT
I don't think there should be an error message. Instead the file should be created at the target of the symlink, as it would be were you to use any UNIX utility.
Comment 2 Chris McGee CLA 2011-10-05 16:22:14 EDT
For certain unix commands it would try to write to the destination file provided that the target's parent folder exists. Otherwise, they tend to produce a file not found error similar to the one I saw in eclipse.

For others such as Nautilus it just won't let the user perform the operation indicating that something already exists in the location with that name.

In any case I don't think that the symbolic link is deleted and it shouldn't be deleted while using eclipse either.
Comment 3 Szymon Brandys CLA 2011-10-07 09:06:13 EDT
It is indeed a major issue. First of let's try to not delete the file.
Comment 4 Szymon Brandys CLA 2012-04-25 11:25:30 EDT
We most likely will not address these bugs during this dev cycle.
Comment 5 Eclipse Genie CLA 2020-03-19 17:41:57 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.