Handle classic plugin file rename

This commit is contained in:
HaveAGitGat 2023-09-07 04:57:27 +01:00
parent d271bb02b6
commit f89f7c4fcf
2 changed files with 26 additions and 10 deletions

View file

@ -121,6 +121,14 @@ export const runClassicPlugin = async (args:IpluginInputArgs, type:'filter'|'tra
otherArguments,
);
if (result?.file?._id && args.inputFileObj._id !== result.file._id) {
// eslint-disable-next-line no-param-reassign
args.inputFileObj._id = result.file._id;
// eslint-disable-next-line no-param-reassign
args.inputFileObj.file = result.file.file;
args.jobLog(`File ID changed from ${args.inputFileObj._id} to ${result.file._id}`);
}
return {
result,
cacheFilePath,