Merge pull request #11838 from NixOS/mergify/bp/2.24-maintenance/pr-11837

fix(libutil/posix-source-accessor.cc): get rid of use-after-move bug (backport #11837)
This commit is contained in:
Jörg Thalheim 2024-11-08 16:02:45 +01:00 committed by GitHub
commit ef21dfa221
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,8 +7,8 @@
namespace nix {
PosixSourceAccessor::PosixSourceAccessor(std::filesystem::path && root)
: root(std::move(root))
PosixSourceAccessor::PosixSourceAccessor(std::filesystem::path && argRoot)
: root(std::move(argRoot))
{
assert(root.empty() || root.is_absolute());
displayPrefix = root.string();