Commit 83233322 by Jongsoo Lee

fix db opening error with absolute path on windows

fix SQLITE_CANTOPEN error when cached.Database is called with absolute path on windows
use path.resolve for getting absolute path
parent b3cbf17d
...@@ -26,9 +26,7 @@ sqlite3.cached = { ...@@ -26,9 +26,7 @@ sqlite3.cached = {
return new Database(file, a, b); return new Database(file, a, b);
} }
if (file[0] !== '/') { file = path.resolve(file);
file = path.join(process.cwd(), file);
}
if (!sqlite3.cached.objects[file]) { if (!sqlite3.cached.objects[file]) {
var db =sqlite3.cached.objects[file] = new Database(file, a, b); var db =sqlite3.cached.objects[file] = new Database(file, a, b);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment