diff --git a/lib/database.js b/lib/database.js index 14e05739..39b3cb38 100644 --- a/lib/database.js +++ b/lib/database.js @@ -61,7 +61,7 @@ function Database(filenameGiven, options) { } // Make sure the specified directory exists - if (!anonymous && !fs.existsSync(path.dirname(filename))) { + if (!filename.startsWith('file://') && !anonymous && !fs.existsSync(path.dirname(filename))) { throw new TypeError('Cannot open database because the directory does not exist'); }