Skip to content

Commit

Permalink
fix(memory): storage not working, fix #519 (#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
DGCK81LNN authored Feb 16, 2022
1 parent 206c97e commit be0cbfe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/database/memory/src/storage/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export class Storage {
const files = await fs.readdir(root)
await Promise.all(files.map(async (filename) => {
const extension = extname(filename)
if (extension !== loader) return
const buffer = await fs.readFile(filename)
if (extension !== `.${loader}`) return
const buffer = await fs.readFile(resolve(root, filename))
try {
const data = await this.load(buffer, loader)
const name = filename.slice(0, -1 - extension.length)
const name = filename.slice(0, filename.length - extension.length)
tables[name] = data
} catch {}
}))
Expand Down

0 comments on commit be0cbfe

Please sign in to comment.