Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
fefb44e6
Commit
fefb44e6
authored
May 09, 2020
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1356 (fixes for readonly metadata.db)
Fix remove trailing metadata.db at entering calibre_db_path
parent
75fb7c2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
admin.py
cps/admin.py
+4
-0
No files found.
cps/admin.py
View file @
fefb44e6
...
...
@@ -22,6 +22,7 @@
from
__future__
import
division
,
print_function
,
unicode_literals
import
os
import
re
import
base64
import
json
import
time
...
...
@@ -615,6 +616,7 @@ def _configuration_update_helper():
db_change
=
False
to_save
=
request
.
form
.
to_dict
()
to_save
[
'config_calibre_dir'
]
=
re
.
sub
(
'[[
\\
/]metadata
\
.db$'
,
''
,
to_save
[
'config_calibre_dir'
],
flags
=
re
.
IGNORECASE
)
db_change
|=
_config_string
(
to_save
,
"config_calibre_dir"
)
# Google drive setup
...
...
@@ -691,6 +693,8 @@ def _configuration_update_helper():
if
db_change
:
if
not
db
.
setup_db
(
config
):
return
_configuration_result
(
_
(
'DB Location is not Valid, Please Enter Correct Path'
),
gdriveError
)
if
not
os
.
access
(
os
.
path
.
join
(
config
.
config_calibre_dir
,
"metadata.db"
),
os
.
W_OK
):
flash
(
_
(
u"DB is not writeable"
),
category
=
"warning"
)
config
.
save
()
flash
(
_
(
u"Calibre-Web configuration updated"
),
category
=
"success"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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