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

Bug 361574

Summary: IResourceTree.standardDeleteFile() is not deleting an unbound symbolic link on Linux
Product: [Eclipse Project] Platform Reporter: Chris McGee <cbmcgee>
Component: ResourcesAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: Dmitry_Karasik, remy.suen
Version: 3.5.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description Chris McGee CLA 2011-10-20 12:27:38 EDT
There is a time period between the user deleting the target of the symbolic link and actually refreshing the eclipse workspace where a call to standardDeleteFile() will succeed without actually deleting the symbolic link on the filesystem. Instead, the symbolic link is removed from view of the workspace.

The problem appears to be in the ResourceTree.internalDeleteFile() where there is an if statement that checks IFileInfo.exists(). On Unix, this will return false on a symbolic link if the target does not exist. the internalDeleteFile() then calls deletedFile() and returns true having never deleting the link from the filesystem.

This call should also check IFileInfo.getAttribute(EFS.ATTRIBUTE_SYMLINK), which could still be true if the symbolic link remains on the file system but would be false otherwise. If the link remains on disk then the symbolic link should be deleted.
Comment 1 Lars Vogel CLA 2019-11-14 03:15:29 EST
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.

If you have further information on the current state of the bug, please add it. 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.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.