mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Refactor ScriptApiSecurity for cleaner separation of concerns
This commit is contained in:
parent
4c44942a39
commit
1fd4e0b82d
11 changed files with 229 additions and 135 deletions
|
@ -50,11 +50,17 @@ class AsyncWorkerThread : public Thread,
|
|||
public:
|
||||
virtual ~AsyncWorkerThread();
|
||||
|
||||
void *run();
|
||||
void *run() override;
|
||||
|
||||
protected:
|
||||
AsyncWorkerThread(AsyncEngine* jobDispatcher, const std::string &name);
|
||||
|
||||
bool checkPathInternal(const std::string &abs_path, bool write_required,
|
||||
bool *write_allowed) override {
|
||||
return ScriptApiSecurity::checkPathWithGamedef(getStack(),
|
||||
abs_path, write_required, write_allowed);
|
||||
};
|
||||
|
||||
private:
|
||||
AsyncEngine *jobDispatcher = nullptr;
|
||||
bool isErrored = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue