1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-22 08:51:08 +01:00

Fix windows build of new source accessor test

We don't have the dirFd on window at this time.
This commit is contained in:
John Ericson 2025-12-17 12:51:09 -05:00
parent 2f092870e4
commit 30cd9e43e1

View file

@ -91,7 +91,9 @@ TEST_F(FSSourceAccessorTest, works)
{ {
RestoreSink sink(false); RestoreSink sink(false);
sink.dstPath = tmpDir; sink.dstPath = tmpDir;
#ifndef _WIN32
sink.dirFd = openDirectory(tmpDir); sink.dirFd = openDirectory(tmpDir);
#endif
sink.createDirectory(CanonPath("subdir")); sink.createDirectory(CanonPath("subdir"));
sink.createRegularFile(CanonPath("file1"), [](CreateRegularFileSink & crf) { crf("content1"); }); sink.createRegularFile(CanonPath("file1"), [](CreateRegularFileSink & crf) { crf("content1"); });
sink.createRegularFile(CanonPath("subdir/file2"), [](CreateRegularFileSink & crf) { crf("content2"); }); sink.createRegularFile(CanonPath("subdir/file2"), [](CreateRegularFileSink & crf) { crf("content2"); });