Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342450 - [dstore] Real files should not be deleted when deleting a symbolic link
Summary: [dstore] Real files should not be deleted when deleting a symbolic link
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 344565
  Show dependency tree
 
Reported: 2011-04-11 11:12 EDT by Samuel Wu CLA
Modified: 2011-05-03 09:12 EDT (History)
1 user (show)

See Also:


Attachments
patch to check for symbolic link before recursive delete attempt (3.07 KB, patch)
2011-04-11 12:25 EDT, David McKnight CLA
no flags Details | Diff

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