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 { namespace nix {
PosixSourceAccessor::PosixSourceAccessor(std::filesystem::path && root) PosixSourceAccessor::PosixSourceAccessor(std::filesystem::path && argRoot)
: root(std::move(root)) : root(std::move(argRoot))
{ {
assert(root.empty() || root.is_absolute()); assert(root.empty() || root.is_absolute());
displayPrefix = root.string(); displayPrefix = root.string();