aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/database-vm.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/dev/database-vm.js b/dev/database-vm.js
index 014c989f..0127bc8f 100644
--- a/dev/database-vm.js
+++ b/dev/database-vm.js
@@ -84,7 +84,13 @@ class Blob {
}
async function fetch(url2) {
- const filePath = url.fileURLToPath(url2);
+ const extDir = path.join(__dirname, '..', 'ext');
+ let filePath;
+ try {
+ filePath = url.fileURLToPath(url2);
+ } catch (e) {
+ filePath = path.resolve(extDir, url2.replace(/^[/\\]/, ''));
+ }
await Promise.resolve();
const content = fs.readFileSync(filePath, {encoding: null});
return {