Project

General

Profile

Actions

Bug #12857

closed

Generic method "File_remove" can delete empty directories

Added by Félix DALLIDET almost 6 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Very Small
Priority:
0
Name check:
Fix check:
Regression:

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.

Actions #1

Updated by Alexis Mousset over 5 years ago

  • Effort required set to Very Small

We can add a simple test before actual action.

Actions #2

Updated by Alexis Mousset over 5 years ago

  • Target version set to 4.1.16
Actions #3

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 4.1.16 to 4.1.17
Actions #4

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES
Actions #5

Updated by Nicolas CHARLES over 5 years ago

  • 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
Actions #6

Updated by Rudder Quality Assistant over 5 years ago

  • Assignee changed from Alexis Mousset to Nicolas CHARLES
Actions #7

Updated by Nicolas CHARLES over 5 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:d2556b48bf1f94828a624549bc684147abacfb6c.

Actions #8

Updated by Vincent MEMBRÉ over 5 years ago

  • Translation missing: en.field_tag_list set to Next minor release
Actions #9

Updated by François ARMAND over 5 years ago

  • Subject changed from File_absent GM can remove empty directories to Generic method "File_remove" can delete empty directories
Actions #10

Updated by Vincent MEMBRÉ over 5 years ago

  • Status changed from Pending release to Released
This bug has been fixed in Rudder 4.1.17, 4.3.7 and 5.0.3 which were released today.
Changelog
Changelog
Changelog
Actions #11

Updated by Alexis Mousset almost 2 years ago

  • Project changed from 41 to Rudder
  • Category changed from Generic methods to Generic methods
Actions

Also available in: Atom PDF