From ac9721a92e8138d29707824dbedb484c76948493 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Thu, 21 Aug 2025 14:36:10 +0000 Subject: [PATCH] Revert "libutil: add `makeTempSiblingPath` helper" 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: Ifc8ccc212ec73f51958b20c9419c81d723f87b0d --- lix/libutil/file-system.cc | 5 ----- lix/libutil/file-system.hh | 5 ----- 2 files changed, 10 deletions(-) diff --git a/lix/libutil/file-system.cc b/lix/libutil/file-system.cc index 4464fccf5..60f2e91ff 100644 --- a/lix/libutil/file-system.cc +++ b/lix/libutil/file-system.cc @@ -693,11 +693,6 @@ Path makeTempPath(const Path & root, const Path & suffix) return fmt("%1%%2%-%3%-%4%", root, suffix, getpid(), counter.fetch_add(1, std::memory_order_relaxed)); } -Path makeTempSiblingPath(const Path & path) -{ - return makeTempPath(fs::path(path).remove_filename()); -} - void createSymlink(const Path & target, const Path & link) { if (symlink(target.c_str(), link.c_str())) diff --git a/lix/libutil/file-system.hh b/lix/libutil/file-system.hh index cdcb61a65..8b9100bdc 100644 --- a/lix/libutil/file-system.hh +++ b/lix/libutil/file-system.hh @@ -318,11 +318,6 @@ Path createTempSubdir(const Path & parent, const Path & prefix = "nix", */ Path makeTempPath(const Path & root, const Path & suffix = ".tmp"); -/** - * Return temporary path in the same directory as a given path. - */ -Path makeTempSiblingPath(const Path & root); - /** * Used in various places. */