File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,6 @@ import (
10
10
"strings"
11
11
12
12
"code.gitea.io/gitea/modules/log"
13
-
14
- "github.com/unknwon/com"
15
13
)
16
14
17
15
// enumerates all the policy repository creating
@@ -249,19 +247,14 @@ var (
249
247
)
250
248
251
249
func newRepository () {
252
- homeDir , err := com .HomeDir ()
253
- if err != nil {
254
- log .Fatal ("Failed to get home directory: %v" , err )
255
- }
256
- homeDir = strings .ReplaceAll (homeDir , "\\ " , "/" )
257
-
250
+ var err error
258
251
// Determine and create root git repository path.
259
252
sec := Cfg .Section ("repository" )
260
253
Repository .DisableHTTPGit = sec .Key ("DISABLE_HTTP_GIT" ).MustBool ()
261
254
Repository .UseCompatSSHURI = sec .Key ("USE_COMPAT_SSH_URI" ).MustBool ()
262
255
Repository .MaxCreationLimit = sec .Key ("MAX_CREATION_LIMIT" ).MustInt (- 1 )
263
256
Repository .DefaultBranch = sec .Key ("DEFAULT_BRANCH" ).MustString (Repository .DefaultBranch )
264
- RepoRootPath = sec .Key ("ROOT" ).MustString (path .Join (homeDir , "gitea-repositories" ))
257
+ RepoRootPath = sec .Key ("ROOT" ).MustString (path .Join (AppDataPath , "gitea-repositories" ))
265
258
forcePathSeparator (RepoRootPath )
266
259
if ! filepath .IsAbs (RepoRootPath ) {
267
260
RepoRootPath = filepath .Join (AppWorkPath , RepoRootPath )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ architectures:
18
18
19
19
environment :
20
20
GITEA_CUSTOM : " $SNAP_COMMON"
21
- GITEA_WORK_DIR : " $SNAP_DATA "
21
+ GITEA_WORK_DIR : " $SNAP_COMMON "
22
22
GIT_TEMPLATE_DIR : " $SNAP/usr/share/git-core/templates"
23
23
GIT_EXEC_PATH : " $SNAP/usr/lib/git-core"
24
24
You can’t perform that action at this time.
0 commit comments