Skip to content

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants