Skip to content
Snippets Groups Projects
Commit be1a917b authored by Eelco Dolstra's avatar Eelco Dolstra
Browse files

* Remove obstructing invalid store paths add[Text]ToStore().

parent daf0a923
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment