Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alp Deniz Ogut
Pod
Commits
3cead359
Unverified
Commit
3cead359
authored
3 years ago
by
Vasili Novikov
Browse files
Options
Download
Email Patches
Plain Diff
Add database decryption errors descriptions
parent
29a8a606
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/warp_endpoints.rs
+5
-2
src/warp_endpoints.rs
with
5 additions
and
2 deletions
+5
-2
src/warp_endpoints.rs
+
5
-
2
View file @
3cead359
...
...
@@ -13,6 +13,7 @@ use crate::constants;
use
crate
::
database_api
;
use
crate
::
database_migrate_refinery
;
use
crate
::
error
::
Error
;
use
crate
::
error
::
ErrorContext
;
use
crate
::
error
::
Result
;
use
crate
::
file_api
;
use
crate
::
internal_api
;
...
...
@@ -230,8 +231,10 @@ fn initialize_db(
)
->
Result
<
Connection
>
{
let
database_path
=
format!
(
"{}{}"
,
&
owner
,
constants
::
DATABASE_SUFFIX
);
let
database_path
=
PathBuf
::
from
(
constants
::
DATABASE_DIR
)
.join
(
database_path
);
let
mut
conn
=
Connection
::
open
(
database_path
)
.unwrap
();
DatabaseKey
::
execute_sqlite_pragma
(
database_key
,
&
conn
)
?
;
let
mut
conn
=
Connection
::
open
(
database_path
)
.context_str
(
"Failed to open database file (does Pod have filesystem access?)"
)
?
;
DatabaseKey
::
execute_sqlite_pragma
(
database_key
,
&
conn
)
.context_str
(
"Failed to open the database file (did databaseKey change between runs?)"
)
?
;
conn
.execute_batch
(
"PRAGMA foreign_keys = ON;"
)
?
;
let
mut
init_db
=
init_db
.write
()
?
;
if
!
init_db
.contains
(
owner
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets