Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Upstream
Gitea
Commits
f91b8c5f
Commit
f91b8c5f
authored
8 years ago
by
Bo-Yi Wu
Browse files
Options
Download
Email Patches
Plain Diff
refactor: check the error returned by os.MkdirAll()
parent
97170916
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/setting/setting.go
+3
-1
modules/setting/setting.go
with
3 additions
and
1 deletion
+3
-1
modules/setting/setting.go
View file @
f91b8c5f
...
...
@@ -660,7 +660,9 @@ please consider changing to GITEA_CUSTOM`)
cfg
.
Section
(
"server"
)
.
Key
(
"LFS_JWT_SECRET"
)
.
SetValue
(
LFS
.
JWTSecretBase64
)
os
.
MkdirAll
(
filepath
.
Dir
(
CustomConf
),
os
.
ModePerm
)
if
err
:=
os
.
MkdirAll
(
filepath
.
Dir
(
CustomConf
),
os
.
ModePerm
);
err
!=
nil
{
log
.
Fatal
(
4
,
"Fail to create '%s': %v"
,
CustomConf
,
err
)
}
if
err
:=
cfg
.
SaveTo
(
CustomConf
);
err
!=
nil
{
log
.
Fatal
(
4
,
"Error saving generated JWT Secret to custom config: %v"
,
err
)
return
...
...
This diff is collapsed.
Click to expand it.
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