diff --git a/app/lib/database/index.js b/app/lib/database/index.js index 1508d11f..7745eb5b 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({