mirror of
https://github.com/ziex-dev/ziex.git
synced 2026-07-21 02:59:36 -06:00
fix: handle fileStat for win
This commit is contained in:
parent
3c4bc993e8
commit
87a146eff4
@ -1,6 +1,6 @@
|
||||
.{
|
||||
.name = .zx,
|
||||
.version = "0.0.1-dev.22",
|
||||
.version = "0.0.1-dev.23",
|
||||
.fingerprint = 0xcad77a8d2a3389f2,
|
||||
.minimum_zig_version = "0.15.2",
|
||||
.dependencies = .{
|
||||
|
||||
@ -302,9 +302,12 @@ fn transpileCommand(
|
||||
include_zig: bool,
|
||||
) !void {
|
||||
// Check if path is a file or directory
|
||||
const stat = std.fs.cwd().statFile(path) catch |err| {
|
||||
std.debug.print("Error: Could not access path '{s}': {}\n", .{ path, err });
|
||||
return err;
|
||||
const stat = std.fs.cwd().statFile(path) catch |err| switch (err) {
|
||||
error.IsDir => std.fs.File.Stat{ .kind = .directory, .size = 0, .mode = 0, .atime = 0, .mtime = 0, .ctime = 0, .inode = 0 },
|
||||
else => {
|
||||
std.debug.print("Error: Could not access path '{s}': {}\n", .{ path, err });
|
||||
return err;
|
||||
},
|
||||
};
|
||||
|
||||
if (stat.kind == .directory) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user