Bug #12857
closed
Generic method "File_remove" can delete empty directories
Added by Félix DALLIDET over 6 years ago.
Updated over 2 years ago.
Effort required:
Very Small
Description
if we build a dir like this:
mkdir /tmp/toRemove
Apply a directive based from the GM "file_absent" on the file "/tmp/toRemove", Rudder will remove the folder.
Now, if we make the same directory and add a file in it:
mkdir /tmp/toRemove
touch /tmp/toRemove/afile
Rudder does not remove the directory but returns a compliant report.
This is most likely unwanted.
- Effort required set to Very Small
We can add a simple test before actual action.
- Target version set to 4.1.16
- Target version changed from 4.1.16 to 4.1.17
- Status changed from New to In progress
- Assignee set to Nicolas CHARLES
- Status changed from In progress to Pending technical review
- Assignee changed from Nicolas CHARLES to Alexis Mousset
- Pull Request set to https://github.com/Normation/ncf/pull/874
- Assignee changed from Alexis Mousset to Nicolas CHARLES
- Status changed from Pending technical review to Pending release
- Translation missing: en.field_tag_list set to Next minor release
- Subject changed from File_absent GM can remove empty directories to Generic method "File_remove" can delete empty directories
- Status changed from Pending release to Released
- Project changed from 41 to Rudder
- Category changed from Generic methods to Generic methods
Also available in: Atom
PDF