mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
e0156fa1f8
Previously if we provided a "root" to the bundle directory loader that was a relative path, it would matter whether or not it was prefixed with "./". The logic to trim that path from the paths found walking the root was not taking into account the prefix so the resulting ones that had "./" would leave behind the root path. Later on the bundle loader would generate a "full" path to set on the module file for its location which is the root+path.. which resulted in duplicate "root"s on those id's. To fix this we just normalize the relative paths in the directory loader so that we can not worry about what type of relative path it is. Fixes: #2117 Signed-off-by: Patrick East <east.patrick@gmail.com>