Ironclad / Ironclad/rivet

[Bug]: Read Directory: missing path normalization for portability

Open
#309 3 comments 0 reactions 1 assignee Claimed by @codemile View on GitHub
bug
Dominant language
TypeScript
Stars
4.7k
Forks
388
PR merge metrics
No merged PRs in 30d

Description

### What happened?

The Read Directory node doesn't apply any path normalization to it's output - as a result, you can't easily filter with a regex:

![image](https://github.com/Ironclad/rivet/assets/103348/447e5412-1faf-4d10-b582-1cfc21e629e1)

I suspect this may be why the glob and filter features don't seem to work on Windows either.

the reason I reached for the regex node in this case, was because [glob and exclude don't seem to work on Windows](https://github.com/Ironclad/rivet/issues/304) - so this issue might well be the root cause of that issue.

note that Windows [at the file system API level](https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats) will canonicalize slashes - hence, for better consistency with Linux and Mac OS paths, using the forward slash on Windows should be no problem.

### What was the expected functionality?

Slashes in paths should be normalized to `/`

### Describe your environment

Win 11 Pro

### Relevant log output

_No response_

### Relevant screenshots

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.