Re-instantiate providing location information to LoadFile hooks.

#1835 subtly changed the semantics of the `LoadFile` plugin hook to no
longer have the current script location available for signature files
being loaded through `@load-sigs`. This was undocumented behavior, so
it's technically not a regression, but since at least one external
plugin is depending on it, this change restores the old behavior.
This commit is contained in:
Robin Sommer 2022-04-14 09:54:45 +02:00
parent d29160e9de
commit fccb9ccab0
No known key found for this signature in database
GPG key ID: 6BEDA4DA6B8B23E3
8 changed files with 66 additions and 11 deletions

View file

@ -49,8 +49,9 @@ bool ScannedFile::AlreadyScanned() const
SignatureFile::SignatureFile(std::string file) : file(std::move(file)) { }
SignatureFile::SignatureFile(std::string file, std::string full_path)
: file(std::move(file)), full_path(std::move(full_path))
SignatureFile::SignatureFile(std::string file, std::string full_path, Location load_location)
: file(std::move(file)), full_path(std::move(full_path)),
load_location(std::move(load_location))
{
}