| ... | ... | @@ -675,6 +675,12 @@ test "deleteDir" { |
| 675 | 675 | test "Dir.rename files" { |
| 676 | 676 | try testWithAllSupportedPathTypes(struct { |
| 677 | 677 | fn impl(ctx: *TestContext) !void { |
| 678 | // Rename on Windows can hit intermittent AccessDenied errors |
| 679 | // when certain conditions are true about the host system. |
| 680 | // For now, skip this test when the path type is UNC to avoid them. |
| 681 | // See https://github.com/ziglang/zig/issues/17134 |
| 682 | if (ctx.path_type == .unc) return; |
| 683 | |
| 678 | 684 | const missing_file_path = try ctx.transformPath("missing_file_name"); |
| 679 | 685 | const something_else_path = try ctx.transformPath("something_else"); |
| 680 | 686 | |
| ... | ... | @@ -711,6 +717,12 @@ test "Dir.rename files" { |
| 711 | 717 | test "Dir.rename directories" { |
| 712 | 718 | try testWithAllSupportedPathTypes(struct { |
| 713 | 719 | fn impl(ctx: *TestContext) !void { |
| 720 | // Rename on Windows can hit intermittent AccessDenied errors |
| 721 | // when certain conditions are true about the host system. |
| 722 | // For now, skip this test when the path type is UNC to avoid them. |
| 723 | // See https://github.com/ziglang/zig/issues/17134 |
| 724 | if (ctx.path_type == .unc) return; |
| 725 | |
| 714 | 726 | const test_dir_path = try ctx.transformPath("test_dir"); |
| 715 | 727 | const test_dir_renamed_path = try ctx.transformPath("test_dir_renamed"); |
| 716 | 728 | |
| ... | ... | @@ -722,12 +734,6 @@ test "Dir.rename directories" { |
| 722 | 734 | try testing.expectError(error.FileNotFound, ctx.dir.openDir(test_dir_path, .{})); |
| 723 | 735 | var dir = try ctx.dir.openDir(test_dir_renamed_path, .{}); |
| 724 | 736 | |
| 725 | | // The next rename in this test can hit intermittent AccessDenied |
| 726 | | // errors when certain conditions are true about the host system. |
| 727 | | // For now, return early when the path type is UNC to avoid them. |
| 728 | | // See https://github.com/ziglang/zig/issues/17134 |
| 729 | | if (ctx.path_type == .unc) return; |
| 730 | | |
| 731 | 737 | // Put a file in the directory |
| 732 | 738 | var file = try dir.createFile("test_file", .{ .read = true }); |
| 733 | 739 | file.close(); |