[HOTFIX] Transform paths to binary as expected - #47
Conversation
The whole codebase expects to handle binaries, propagate paths as lists can cause bugs
maehjam
left a comment
There was a problem hiding this comment.
Good small hot fix.
Maybe we should discuss the fact that we expect binaries for filenames in the whole code base and consider a refactoring towards lists for filenames or handling both cases everywhere. Also this bug points to missing test coverage. (Just checked we don't have tests in the repo at all 👀 )
|
Looks a bit like something dialyzer would find. I tried and couldn't see a warning directly related to it, but there are a bunch of dialyzer warnings for this repo. That would be easier to include in the development pipeline and we should include it first before working on testing via common tests. |
|
Yes I did not want to include a refactoring here. What we could do is sanitize all handlings of binaries that are more strict then the return type of filename functions. |
The whole codebase expects to handle binaries, propagate paths as lists can cause bugs
This fixes a bug, this function expects paths as binaries otherwise it silently fails at matching template extension.
A non match means no loader config -> NO BOOTABLE SD CARD
Tested with a grisp2 deployment