Skip to content
Snippets Groups Projects
Commit 820d7dca authored by renatoathaydes's avatar renatoathaydes
Browse files

Fixed openDir calls to allow iteration.

parent 4701501b
No related branches found
No related tags found
No related merge requests found
Pipeline #12150 passed with stages
in 11 seconds
......@@ -11,7 +11,7 @@ pub fn build(b: *std.Build) void {
const samples_dir = "source/processed/samples/";
fn testAllSamples(b: *std.Build, test_step: *std.Build.Step) !void {
var samples = try std.fs.cwd().openDir(samples_dir, .{});
var samples = try std.fs.cwd().openDir(samples_dir, .{ .iterate = true });
defer samples.close();
var iterator = samples.iterate();
var child = try iterator.next();
......
......@@ -3,7 +3,7 @@ const std = @import("std");
// Sample starts here{{ slot contents }}\
test "List contents of directory" {
var children = std.fs.cwd().openDir("source", .{}) catch {
var children = std.fs.cwd().openDir("source", .{ .iterate = true }) catch {
// couldn't open dir
return;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment