1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 10:31:15 +02:00

Fix build errors on Windows

This commit is contained in:
John Ericson 2024-08-19 11:02:46 -04:00
parent 67a54d47c5
commit 84ea12ad7f
5 changed files with 31 additions and 32 deletions

View file

@ -23,9 +23,9 @@ bool dryRun = false;
void removeOldGenerations(std::filesystem::path dir)
{
if (access(dir.c_str(), R_OK) != 0) return;
if (access(dir.string().c_str(), R_OK) != 0) return;
bool canWrite = access(dir.c_str(), W_OK) == 0;
bool canWrite = access(dir.string().c_str(), W_OK) == 0;
for (auto & i : std::filesystem::directory_iterator{dir}) {
checkInterrupt();