Merge pull request #11837 from xokdvium/dev/fix-use-after-move-posix-source

fix(libutil/posix-source-accessor.cc): get rid of use-after-move bug
This commit is contained in:
Jörg Thalheim 2024-11-08 14:56:50 +01:00 committed by GitHub
commit 492c678162
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();