Skip to content

Commit 79e0ed9

Browse files
committed
Release 20260406
1 parent 51c42fc commit 79e0ed9

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

hvdata/appmain.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,9 @@ class StorageZip extends IStorage {
338338
this.#storageO = null;
339339
}
340340

341-
async init(path) {
341+
async init(path, freeze = true) {
342342
this.#storageO = await ZIPHelpers.loadZipFromUrl(path);
343+
this.path = path;
343344
this.storageO = this.#storageO;
344345
let hasSlip = false;
345346
const paths = Object.keys(this.#storageO.files);
@@ -357,7 +358,8 @@ class StorageZip extends IStorage {
357358
pane.innerHTML = `⚠ ${msg}`;
358359
throw new Error(msg);
359360
}
360-
Object.freeze(this.#storageO.files);
361+
if (freeze)
362+
Object.freeze(this.#storageO.files);
361363
return this;
362364
}
363365

@@ -391,6 +393,12 @@ class StorageZip extends IStorage {
391393
var mimeType = 'image/' + filePath.split('.').pop().toLowerCase();
392394
return `data:${mimeType};base64,${content}`;
393395
}
396+
397+
async getCopyForChanges() {
398+
const reply = new StorageZip();
399+
await reply.init(this.path, false);
400+
return reply.#storageO;
401+
}
394402
}
395403

396404
function toText(ab) {

hvdata/data.zip

18 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)