1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-26 12:10:59 +01:00

Fixed sharing issue. Created unshare method.

This commit is contained in:
Wouter den Breejen 2007-09-18 15:10:48 +00:00
parent 315cd18337
commit 51cff21c92
18 changed files with 593 additions and 456 deletions

View file

@ -591,11 +591,22 @@ static void performOp(Source & from, Sink & to, unsigned int op)
break;
}
case wopSetSharedState: {
Path fromExisting = readString(from);
Path toNew = readString(from);
case wopShareState: {
Path from_arg = readString(from);
Path to_arg = readString(from);
bool snapshot = readInt(from) == 1;
startWork();
store->setSharedState(fromExisting, toNew);
store->shareState(from_arg, to_arg, snapshot);
stopWork();
writeInt(1, to);
break;
}
case wopUnShareState: {
Path path = readString(from);
bool copyFromOld = readInt(from) == 1;
startWork();
store->unShareState(path, copyFromOld);
stopWork();
writeInt(1, to);
break;