mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
* Remove obstructing invalid store paths add[Text]ToStore().
This commit is contained in:
parent
daf0a923c7
commit
be1a917beb
1 changed files with 6 additions and 0 deletions
|
@ -401,6 +401,9 @@ Path addToStore(const Path & _srcPath)
|
|||
PathLocks outputLock(lockPaths);
|
||||
|
||||
if (!isValidPath(dstPath)) {
|
||||
|
||||
if (pathExists(dstPath)) deletePath(dstPath);
|
||||
|
||||
copyPath(srcPath, dstPath);
|
||||
|
||||
Transaction txn(nixDB);
|
||||
|
@ -426,6 +429,9 @@ void addTextToStore(const Path & dstPath, const string & s)
|
|||
PathLocks outputLock(lockPaths);
|
||||
|
||||
if (!isValidPath(dstPath)) {
|
||||
|
||||
if (pathExists(dstPath)) deletePath(dstPath);
|
||||
|
||||
writeStringToFile(dstPath, s);
|
||||
|
||||
Transaction txn(nixDB);
|
||||
|
|
Loading…
Reference in a new issue