-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavioros-windowsMicrosoft WindowsMicrosoft Windowsstandard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Description
Zig Version
0.10.1
Steps to Reproduce and Observed Behavior
pub fn main() !void {
var current = try std.fs.cwd().openDir(".", .{}); // dup cwd so that the caller can close
errdefer current.close();
var level: u32 = 0;
while (level < 16) : (level += 1) {
std.debug.print("{s}\n", .{try current.realpathAlloc(std.heap.page_allocator, ".")});
var parent = try current.openDir("..", .{});
current.close();
current = parent;
}
}PS C:\Users\matklad\p\tigerbeetle> .\zig\zig.exe run src/shell.zig
C:\Users\matklad\p\tigerbeetle
C:\Users\matklad\p
C:\Users\matklad\p
C:\Users\matklad\p
C:\Users\matklad\p
C:\Users\matklad\p
C:\Users\matklad\p
C:\Users\matklad\p
C:\Users\matklad\p
C:\Users\matklad\p
C:\Users\matklad\p
C:\Users\matklad\p
C:\Users\matklad\p
C:\Users\matklad\p
C:\Users\matklad\p
C:\Users\matklad\p
Expected Behavior
Go up! :-)
squeek502
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavioros-windowsMicrosoft WindowsMicrosoft Windowsstandard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.