Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 262337 - mkdir and rmdir has robustness issues
Summary: mkdir and rmdir has robustness issues
Status: RESOLVED DUPLICATE of bug 262333
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-25 22:34 EST by Henrik Lindberg CLA
Modified: 2009-04-13 09:03 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Lindberg CLA 2009-01-25 22:34:59 EST
Mkdir:
- Mkdir tries to create a directory with the supplied path, and always returns ok. There is no check if the file already exists (and is not a directory). Is this intentional?
- If an undo is performed - the code simply removes the path.
- This leads to that a mistake in the mkdir instruction can cause delete of a file if the provisioning action rolls back.

Rmdir:
- Rmdir simply removes the path it is given - irrespective of if it is a file or a directory.
- On undo, it creates a directory
- A mistake in the install instruction can thus lead to the replacement of a file with content with an empty directory

A backup mechanism as suggested in bug 262333 is needed to enable these actions to move things out of harms way until provisioning is committed.
Comment 1 Henrik Lindberg CLA 2009-01-29 16:37:47 EST
The possible loss of files on use of Mkdir and Rmdir has been corrected in the patch attached to bug 262333.
Comment 2 Henrik Lindberg CLA 2009-04-13 09:03:35 EDT

*** This bug has been marked as a duplicate of bug 262333 ***