Project

General

Profile

Bug #12857

Generic method "File_remove" can delete empty directories

Added by Félix DALLIDET 6 months ago. Updated 17 days 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.

Associated revisions

Revision d2556b48 (diff)
Added by Nicolas CHARLES about 1 month ago

Fixes #12857: File_absent GM can remove empty directories

History

#1 Updated by Alexis MOUSSET 2 months ago

  • Effort required set to Very Small

We can add a simple test before actual action.

#2 Updated by Alexis MOUSSET about 2 months ago

  • Target version set to 4.1.16

#3 Updated by Vincent MEMBRÉ about 1 month ago

  • Target version changed from 4.1.16 to 4.1.17

#4 Updated by Nicolas CHARLES about 1 month ago

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

#5 Updated by Nicolas CHARLES about 1 month 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

#6 Updated by Normation Quality Assistant about 1 month ago

  • Assignee changed from Alexis MOUSSET to Nicolas CHARLES

#7 Updated by Nicolas CHARLES about 1 month ago

  • Status changed from Pending technical review to Pending release

#8 Updated by Vincent MEMBRÉ 29 days ago

  • Tags set to Next minor release

#9 Updated by François ARMAND 20 days ago

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

#10 Updated by Vincent MEMBRÉ 17 days 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

Also available in: Atom PDF