diff --git a/lib/Drivers/DML/sqlite.js b/lib/Drivers/DML/sqlite.js index 16d49a85..1edf1f17 100644 --- a/lib/Drivers/DML/sqlite.js +++ b/lib/Drivers/DML/sqlite.js @@ -14,7 +14,11 @@ function Driver(config, connection, opts) { // on Windows, paths have a drive letter which is parsed by // url.parse() as the hostname. If host is defined, assume // it's the drive letter and add ":" - this.db = new sqlite3.Database(((config.host ? config.host + ":" : "") + (config.pathname || "")) || ':memory:'); + if (process.platform == "win32" && config.host.match(/^[a-z]$/i)) { + this.db = new sqlite3.Database(((config.host ? config.host + ":" : "") + (config.pathname || "")) || ':memory:'); + } else { + this.db = new sqlite3.Database(((config.host ? config.host : "") + (config.pathname || "")) || ':memory:'); + } } this.aggregate_functions = [ "ABS", "ROUND",