mirror of
https://github.com/NixOS/nix
synced 2025-07-06 09:11:47 +02:00
Replace 'bool sync' with an enum for clarity
And drop writeFileAndSync().
This commit is contained in:
parent
479c356510
commit
a4b5584fb1
4 changed files with 21 additions and 36 deletions
|
@ -247,7 +247,7 @@ LocalStore::LocalStore(ref<const Config> config)
|
|||
else if (curSchema == 0) { /* new store */
|
||||
curSchema = nixSchemaVersion;
|
||||
openDB(*state, true);
|
||||
writeFileAndSync(schemaPath, fmt("%1%", curSchema), 0666);
|
||||
writeFile(schemaPath, fmt("%1%", curSchema), 0666, FsSync::Yes);
|
||||
}
|
||||
|
||||
else if (curSchema < nixSchemaVersion) {
|
||||
|
@ -298,7 +298,7 @@ LocalStore::LocalStore(ref<const Config> config)
|
|||
txn.commit();
|
||||
}
|
||||
|
||||
writeFileAndSync(schemaPath, fmt("%1%", nixSchemaVersion), 0666);
|
||||
writeFile(schemaPath, fmt("%1%", nixSchemaVersion), 0666, FsSync::Yes);
|
||||
|
||||
lockFile(globalLock.get(), ltRead, true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue