File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -749,10 +749,6 @@ func NewContext() {
749
749
LFS .HTTPAuthExpiry = sec .Key ("LFS_HTTP_AUTH_EXPIRY" ).MustDuration (20 * time .Minute )
750
750
751
751
if LFS .StartServer {
752
- if err := os .MkdirAll (LFS .ContentPath , 0700 ); err != nil {
753
- log .Fatal ("Failed to create '%s': %v" , LFS .ContentPath , err )
754
- }
755
-
756
752
LFS .JWTSecretBytes = make ([]byte , 32 )
757
753
n , err := base64 .RawURLEncoding .Decode (LFS .JWTSecretBytes , []byte (LFS .JWTSecretBase64 ))
758
754
@@ -1111,11 +1107,20 @@ func loadOrGenerateInternalToken(sec *ini.Section) string {
1111
1107
return token
1112
1108
}
1113
1109
1110
+ func ensureLFSDirectory () {
1111
+ if LFS .StartServer {
1112
+ if err := os .MkdirAll (LFS .ContentPath , 0700 ); err != nil {
1113
+ log .Fatal ("Failed to create '%s': %v" , LFS .ContentPath , err )
1114
+ }
1115
+ }
1116
+ }
1117
+
1114
1118
// NewServices initializes the services
1115
1119
func NewServices () {
1116
1120
InitDBConfig ()
1117
1121
newService ()
1118
1122
NewLogServices (false )
1123
+ ensureLFSDirectory ()
1119
1124
newCacheService ()
1120
1125
newSessionService ()
1121
1126
newCORSService ()
You can’t perform that action at this time.
0 commit comments