Skip to content

Commit

Permalink
'sepinf-inc#2088 initializes script name class field variable executi…
Browse files Browse the repository at this point in the history
…ng getName

from script, if still null.
  • Loading branch information
patrickdalla committed Jun 6, 2024
1 parent f24a065 commit 67ddfe4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions iped-engine/src/main/java/iped/engine/task/ScriptTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ public void process(IItem e) throws Exception {

@Override
public String getName() {
if (scriptName == null) {
try {
scriptName = (String) inv.invokeFunction("getName");
} catch (Exception e) {
scriptName = scriptFile.getName();
}
}
return scriptName;
}

Expand Down

0 comments on commit 67ddfe4

Please sign in to comment.