diff --git a/lib/internal/vfs/providers/ziparchive.js b/lib/internal/vfs/providers/ziparchive.js index e5ecfc7afd7..9f4ecceee46 100644 --- a/lib/internal/vfs/providers/ziparchive.js +++ b/lib/internal/vfs/providers/ziparchive.js @@ -219,6 +219,7 @@ class ZipFileHandle extends VirtualFileHandle { // its own modification time; once dirty the file is as new as its close. #doStat() { return createFileStats(this.#size, { + __proto__: null, mode: this.#entryMode, mtimeMs: this.#dirty || this.#modified === null ? undefined : this.#modified.getTime(), }); @@ -249,13 +250,15 @@ class ZipFileHandle extends VirtualFileHandle { async close() { if (this.#dirty && isWritableFlag(this.flags)) { - await this.#source.add(this.#name, this.#buffer.subarray(0, this.#size), { mode: this.#entryMode }); + await this.#source.add(this.#name, this.#buffer.subarray(0, this.#size), + { __proto__: null, mode: this.#entryMode }); } await super.close(); } closeSync() { if (this.#dirty && isWritableFlag(this.flags)) { - this.#source.addSync(this.#name, this.#buffer.subarray(0, this.#size), { mode: this.#entryMode }); + this.#source.addSync(this.#name, this.#buffer.subarray(0, this.#size), + { __proto__: null, mode: this.#entryMode }); } super.closeSync(); }