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

Bug 342450

Summary: [dstore] Real files should not be deleted when deleting a symbolic link
Product: [Tools] Target Management Reporter: Samuel Wu <samuelwu>
Component: RSEAssignee: David McKnight <dmcknigh>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: dmcknigh
Version: unspecified   
Target Milestone: 3.3 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 344565    
Attachments:
Description Flags
patch to check for symbolic link before recursive delete attempt none

Description Samuel Wu CLA 2011-04-11 11:12:36 EDT
Build Identifier: RSE-runtime-M20110316-2215.zip

When deleting a symbolic linked directory, the contents of the real directory were deleted.

Reproducible: Always

Steps to Reproduce:
1. Create a symbolic link linked to a directory abc which contais some files
2. The directory linked shown in the RSE navigator was recognized as a symbolic link
3. Delete the directory linked from the navigator
4. All the contents of directory abc WERE deleted while it should only remove the symbolic link linked as the command mv does.
Comment 1 David McKnight CLA 2011-04-11 12:25:04 EDT
Created attachment 192944 [details]
patch to check for symbolic link before recursive delete attempt
Comment 2 David McKnight CLA 2011-04-11 12:25:42 EDT
Samuel, could you try with the attached patch?
Comment 3 Samuel Wu CLA 2011-04-11 14:46:28 EDT
Thank you for the prompt response, Dave. The fix works fine on linux but doesn't fix the problem on zOS.
Comment 4 Samuel Wu CLA 2011-05-02 10:43:11 EDT
Hi Dave,
Any update on this problem? Thanks.
Comment 5 David McKnight CLA 2011-05-02 10:45:45 EDT
(In reply to comment #4)
> Hi Dave,
> Any update on this problem? Thanks.

Hi, sorry, I've been sidetracked by other things. I'll try to get back to this soon and test things out on z/OS.
Comment 6 David McKnight CLA 2011-05-02 14:35:13 EDT
Samuel, I tried the patch on a z/os machine (torolabb) and things seem to work for me.  Are you sure you applied the patch in the right place?
Comment 7 Samuel Wu CLA 2011-05-02 16:59:28 EDT
Hi Dave,
It works fine for me as well. I may have done something wrong last time. Sorry for that. 
Can you port this back to 3.2.x? Thanks a lot.
Comment 8 David McKnight CLA 2011-05-03 09:12:43 EDT
I've committed the fix to cvs and opened bug 344565 for the backport to 3.2.x.