From a75211f02efb0f5bdf465550115f1cb00d71fe86 Mon Sep 17 00:00:00 2001 From: fubark Date: Sat, 9 Dec 2023 21:23:54 -0500 Subject: [PATCH] Maybe fix for windows. --- src/cli.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cli.zig b/src/cli.zig index 724ceb4df..717683bae 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -175,6 +175,9 @@ fn zResolve(uvm: *cy.UserVM, chunkId: cy.ChunkId, curUri: []const u8, spec: []co // Get canonical path. chunk.tempBufU8.items.len += std.fs.MAX_PATH_BYTES; + if (builtin.os.tag == .windows) { + _ = std.mem.replaceScalar(u8, chunk.tempBufU8.items[path.len..], '/', '\\'); + } const absPath = std.fs.cwd().realpath(path, chunk.tempBufU8.items[path.len..]) catch |err| { if (err == error.FileNotFound) { const msg = try cy.fmt.allocFormat(vm.alloc, "Import path does not exist: `{}`", &.{v(path)});