Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361574 - IResourceTree.standardDeleteFile() is not deleting an unbound symbolic link on Linux
Summary: IResourceTree.standardDeleteFile() is not deleting an unbound symbolic link o...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.5.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-20 12:27 EDT by Chris McGee CLA
Modified: 2019-11-14 03:15 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.