Revert "libstore: use makeTempSiblingPath in replaceValidPath"

Revert submission 3850

Reason for revert: caused multiple regressions noticed in https://git.lix.systems/lix-project/lix/issues/975 and https://git.lix.systems/lix-project/lix/issues/966 (suspected).

Root cause analysis has not been done yet and this breaks Lix on Darwin on HEAD.

Reverted changes: /q/submissionid:3850

Change-Id: I23f659664bcb1f38ea8cd053279d3275f33e001c
This commit is contained in:
Raito Bezarius
2025-08-21 14:37:46 +00:00
parent 7622d28dd4
commit 1fdaa6888a
+1 -1
View File
@@ -762,7 +762,7 @@ void replaceValidPath(const Path & storePath, const Path & tmpPath)
Path oldPath;
if (pathExists(storePath)) {
do {
oldPath = makeTempSiblingPath(storePath);
oldPath = makeTempPath(storePath, ".old");
// store paths are often directories so we can't just unlink() it
// let's make sure the path doesn't exist before we try to use it
} while (pathExists(oldPath));