diff --git a/packages/nvmedit/src/lib/nvm3/adapter.ts b/packages/nvmedit/src/lib/nvm3/adapter.ts index de0fcd1ca9f1..b2145b878d44 100644 --- a/packages/nvmedit/src/lib/nvm3/adapter.ts +++ b/packages/nvmedit/src/lib/nvm3/adapter.ts @@ -845,6 +845,7 @@ export class NVM3Adapter implements NVMAdapter { if (slice.length > 0) { const file = new SUCUpdateEntriesFileV5({ updateEntries: slice, + fileId, fileVersion, }); changedFiles.push(file); diff --git a/packages/nvmedit/src/lib/nvm3/files/NVMFile.ts b/packages/nvmedit/src/lib/nvm3/files/NVMFile.ts index 22f979579d8a..b2881c4c5e19 100644 --- a/packages/nvmedit/src/lib/nvm3/files/NVMFile.ts +++ b/packages/nvmedit/src/lib/nvm3/files/NVMFile.ts @@ -34,7 +34,7 @@ export class NVMFile { this.fileId = options.fileId; this.payload = options.data; } else { - const fileId = getNVMFileID(this); + const fileId = options.fileId ?? getNVMFileID(this); if (typeof fileId === "number") { this.fileId = fileId; }