Skip to content

CFE-4623: Test that findfiles() returns directories with a trailing slash when given a trailing slash#6007

Open
nickanderson wants to merge 1 commit intocfengine:masterfrom
nickanderson:CFE-4623/master
Open

CFE-4623: Test that findfiles() returns directories with a trailing slash when given a trailing slash#6007
nickanderson wants to merge 1 commit intocfengine:masterfrom
nickanderson:CFE-4623/master

Conversation

@nickanderson
Copy link
Member

Prior to findfiles() fixes related to
https://cfengine.com/blog/2025/change-in-behavior-findfiles/ findfiles() would
return a trailing slash for directories when one was provided.

This behavior was expected by users, but not tested for explicitly nor
documented as an explicit behavior.

Ticket: CFE-4623
Changelog: None

…given a trailing slash

Prior to findfiles() fixes related to
https://cfengine.com/blog/2025/change-in-behavior-findfiles/ findfiles() would
return a trailing slash for directories when one was provided.

This behavior was expected by users, but not tested for explicitly nor
documented as an explicit behavior.

Ticket: CFE-4623
Changelog: None
@cf-bottom
Copy link

Thank you for submitting a pull request! Maybe @larsewi can review this?

classes:

"ok"
expression => regcmp( ".*[\\]$", $(test.find_this_promise_dirname) );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From GitHub Actions:

error: Regular expression error: 'missing terminating ] for character class' in expression '.*[\]$' (offset: 6)

I think what is happening here is that \\ becomes \, then the ] gets escaped.

I'm not sure if you need a character set (i.e., []) here at all, since you're only matching one character.

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Marking this PR as stale due to inactivity; it will be closed in 7 days.

@github-actions github-actions bot added the stale Pull requests with no recent activity label Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Pull requests with no recent activity

Development

Successfully merging this pull request may close these issues.

3 participants