diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-12-06 20:43:57 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:15:08 -0800 |
| commit | 877032ec6a0007316f42658d12042f1473de4856 (patch) | |
| tree | d6541c2050b24f97ef80895061e881bc31fc5449 /lib/std/debug | |
| parent | 8328de24f13e21e325207b19288a143854df50df (diff) | |
| download | zig-877032ec6a0007316f42658d12042f1473de4856.tar.gz zig-877032ec6a0007316f42658d12042f1473de4856.zip | |
std: reorganize realpath and process executable APIs
Diffstat (limited to 'lib/std/debug')
| -rw-r--r-- | lib/std/debug/SelfInfo/Elf.zig | 2 | ||||
| -rw-r--r-- | lib/std/debug/SelfInfo/Windows.zig | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/debug/SelfInfo/Elf.zig b/lib/std/debug/SelfInfo/Elf.zig index 124768687c..213389bf04 100644 --- a/lib/std/debug/SelfInfo/Elf.zig +++ b/lib/std/debug/SelfInfo/Elf.zig @@ -329,7 +329,7 @@ const Module = struct { defer file.close(io); break :res std.debug.ElfFile.load(gpa, file, mod.build_id, &.native(mod.name)); } else res: { - const path = std.fs.selfExePathAlloc(gpa) catch |err| switch (err) { + const path = std.process.executablePathAlloc(io, gpa) catch |err| switch (err) { error.OutOfMemory => |e| return e, else => return error.ReadFailed, }; diff --git a/lib/std/debug/SelfInfo/Windows.zig b/lib/std/debug/SelfInfo/Windows.zig index c7f9d8c352..f0ac30cca2 100644 --- a/lib/std/debug/SelfInfo/Windows.zig +++ b/lib/std/debug/SelfInfo/Windows.zig @@ -434,7 +434,7 @@ const Module = struct { const pdb_file_open_result = if (fs.path.isAbsolute(path)) res: { break :res std.fs.cwd().openFile(io, path, .{}); } else res: { - const self_dir = fs.selfExeDirPathAlloc(gpa) catch |err| switch (err) { + const self_dir = std.process.executableDirPathAlloc(io, gpa) catch |err| switch (err) { error.OutOfMemory, error.Unexpected => |e| return e, else => return error.ReadFailed, }; |
