mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
3be55ed660
The file loader splits paths on the first colon character and uses the left-hand side for the prefix to root the document at under data. On windows this is problematic because of drive lettesr (e.g., C:\X\Y\Z is interpreted as load file at \X\Y\Z under data.C. This change updates the loader to accept file:// URLs. This way callers can unambiguously specify filenames that contain colon characters. For now this will mainly be used by VS Code and other programmatic callers. In future we can support other schemes (e.g., http). Fixes #1505 Signed-off-by: Torin Sandall <torinsandall@gmail.com>