Project

General

Profile

Actions

Bug #12857

closed

Generic method "File_remove" can delete empty directories

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

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
User visibility:
Effort required:
Very Small
Priority:
0

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 2 years ago

  • Effort required set to Very Small

We can add a simple test before actual action.

Actions #2

Updated by Alexis MOUSSET over 2 years ago

  • Target version set to 4.1.16
Actions #3

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 4.1.16 to 4.1.17
Actions #4

Updated by Nicolas CHARLES over 2 years ago

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

Updated by Nicolas CHARLES over 2 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 2 years ago

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

Updated by Nicolas CHARLES over 2 years ago

  • Status changed from Pending technical review to Pending release
Actions #8

Updated by Vincent MEMBRÉ over 2 years ago

  • Tags set to Next minor release
Actions #9

Updated by François ARMAND over 2 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 2 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

Also available in: Atom PDF