correctly handle path to uri conversion

This commit is contained in:
Techatrix
2022-08-20 15:34:36 +02:00
parent d57f8e3a64
commit f543659e31
2 changed files with 6 additions and 6 deletions

View File

@@ -161,10 +161,7 @@ pub fn translate(allocator: std.mem.Allocator, config: Config, include_dirs: []c
return switch (result.term) {
.Exited => |code| if (code == 0) {
return try std.mem.join(allocator, "", &.{
"file://",
std.mem.sliceTo(result.stdout, '\n'),
});
return try allocator.dupe(u8, std.mem.sliceTo(result.stdout, '\n'));
} else {
// TODO convert failure to `textDocument/publishDiagnostics`
std.log.err("zig translate-c process failed, code: {}, stderr: '{s}'", .{ code, result.stderr });