Skip to content

Commit

Permalink
read asset from specific file
Browse files Browse the repository at this point in the history
  • Loading branch information
mmeigs committed Jan 29, 2024
1 parent 79151d3 commit 3d1c36f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/init/DocumentDatabase.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ class ManifestDocumentDatabase {

async getAsset(checksum) {
if (!this.zip) {
const assets = JSON.parse(fs.readFileSync('snooty-assets.json'));
const asset = assets[checksum];
return asset.assetData;
const asset = fs.readFileSync(`assets/${checksum}`);
return asset;
}
const result = this.zip.getEntry(`assets/${checksum}`);
if (result) {
Expand Down

0 comments on commit 3d1c36f

Please sign in to comment.