From 8814fc539dd25f6d4c0574e20873bfd190f70ef0 Mon Sep 17 00:00:00 2001 From: Hiroki Ishiura Date: Wed, 5 Feb 2020 23:01:01 +0900 Subject: [PATCH] [FIX] Server with subdirs (#1646) --- app/lib/database/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/database/index.js b/app/lib/database/index.js index 1508d11fc..7745eb5b1 100644 --- a/app/lib/database/index.js +++ b/app/lib/database/index.js @@ -60,7 +60,7 @@ class DB { } setShareDB(database = '') { - const path = database.replace(/(^\w+:|^)\/\//, '').replace(/\//, '.'); + const path = database.replace(/(^\w+:|^)\/\//, '').replace(/\//g, '.'); const dbName = `${ appGroupPath }${ path }.db`; const adapter = new SQLiteAdapter({ @@ -83,7 +83,7 @@ class DB { } setActiveDB(database = '') { - const path = database.replace(/(^\w+:|^)\/\//, '').replace(/\//, '.'); + const path = database.replace(/(^\w+:|^)\/\//, '').replace(/\//g, '.'); const dbName = `${ appGroupPath }${ path }.db`; const adapter = new SQLiteAdapter({