libstore: use makeTempSiblingPath in replaceValidPath

Change-Id: I6a6a69641a3b4e6fdd076faac44dc314e6cc057e
This commit is contained in:
Emily
2025-11-18 11:08:31 +01:00
committed by Qyriad
parent 1cc3989c8e
commit 8a27e3d657
+1 -1
View File
@@ -886,7 +886,7 @@ void replaceValidPath(const Path & storePath, const Path & tmpPath)
Path oldPath;
if (pathExists(storePath)) {
do {
oldPath = makeTempPath(storePath, ".old");
oldPath = makeTempSiblingPath(storePath);
// 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));