mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-05 07:35:34 +08:00
fix(db): fix database setup
This commit is contained in:
parent
926c623fba
commit
1d1c4a6e3a
2 changed files with 5 additions and 3 deletions
|
@ -134,7 +134,7 @@
|
|||
|
||||
background: @background-primary;
|
||||
border: 0;
|
||||
box-shadow: 0 0px 0.5px rgba(0, 0, 0, 0.28), 0 1px 1.5px rgba(0, 0, 0, 0.08);
|
||||
box-shadow: 0 0 0.5px rgba(0, 0, 0, 0.28), 0 1px 1.5px rgba(0, 0, 0, 0.08);
|
||||
border-radius: 4px;
|
||||
|
||||
&:first-child { padding-top: 0; }
|
||||
|
@ -356,7 +356,7 @@
|
|||
z-index: 2;
|
||||
|
||||
border: 0;
|
||||
box-shadow: 0 0px 0.5px rgba(0, 0, 0, 0.28), 0 1px 1.5px rgba(0, 0, 0, 0.08);
|
||||
box-shadow: 0 0 0.5px rgba(0, 0, 0, 0.28), 0 1px 1.5px rgba(0, 0, 0, 0.08);
|
||||
border-top: 1px dashed @border-color-divider;
|
||||
border-radius: 0 0 4px 4px;
|
||||
background: @background-primary;
|
||||
|
|
|
@ -61,6 +61,7 @@ class DatabaseManager
|
|||
closeDatabaseConnection: (databasePath) ->
|
||||
@_databases[databasePath]?.close()
|
||||
delete @_databases[databasePath]
|
||||
delete @_prepPromises[databasePath]
|
||||
|
||||
closeDatabaseConnections: ->
|
||||
for path, val of @_databases
|
||||
|
@ -72,6 +73,7 @@ class DatabaseManager
|
|||
db.on 'close', -> fs.unlinkSync(path)
|
||||
db.close()
|
||||
delete @_databases[path]
|
||||
delete @_prepPromises[path]
|
||||
|
||||
onIPCDatabaseQuery: (event, {databasePath, queryKey, query, values}) =>
|
||||
db = @_databases[databasePath]
|
||||
|
@ -121,7 +123,7 @@ class DatabaseManager
|
|||
return Promise.resolve(db)
|
||||
.catch (err) ->
|
||||
@emit("setup-error", err)
|
||||
console.error "There was an error setting up the database #{err?.message}"
|
||||
console.error "!!!!!!!!!!! There was an error setting up the database #{err?.message}"
|
||||
return Promise.reject(err)
|
||||
|
||||
_getDBAdapter: ->
|
||||
|
|
Loading…
Reference in a new issue