fix: windows build

This commit is contained in:
CJ van den Berg 2025-12-28 22:23:44 +01:00
parent 85f5e5ab2e
commit eae28536d2
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -999,7 +999,8 @@ fn file_uri_to_path(uri: []const u8, file_path_buf: []u8) error{InvalidTargetURI
return convert_path(file_path); return convert_path(file_path);
} }
fn convert_path(file_path: []u8) []u8 { fn convert_path(file_path_: []u8) []u8 {
var file_path = file_path_;
if (builtin.os.tag == .windows) { if (builtin.os.tag == .windows) {
if (file_path[0] == '/') file_path = file_path[1..]; if (file_path[0] == '/') file_path = file_path[1..];
for (file_path, 0..) |c, i| if (c == '/') { for (file_path, 0..) |c, i| if (c == '/') {