File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import (
16
16
17
17
"code.gitea.io/gitea/modules/log"
18
18
"code.gitea.io/gitea/modules/setting"
19
- "code.gitea.io/gitea/modules/util"
20
19
21
20
// Needed for the MySQL driver
22
21
_ "github.com/go-sql-driver/mysql"
@@ -348,12 +347,3 @@ func DumpDatabase(filePath string, dbType string) error {
348
347
}
349
348
return x .DumpTablesToFile (tbs , filePath )
350
349
}
351
-
352
- // absolutePath make path absolute if it is relative
353
- func absolutePath (path string ) string {
354
- workDir , err := setting .WorkDir ()
355
- if err != nil {
356
- log .Fatal (4 , "Failed to get work directory: %v" , err )
357
- }
358
- return util .EnsureAbsolutePath (path , workDir )
359
- }
Original file line number Diff line number Diff line change @@ -532,7 +532,7 @@ func getAppPath() (string, error) {
532
532
if IsWindows && filepath .IsAbs (os .Args [0 ]) {
533
533
appPath = filepath .Clean (os .Args [0 ])
534
534
} else {
535
- appPath , err : = exec .LookPath (os .Args [0 ])
535
+ appPath , err = exec .LookPath (os .Args [0 ])
536
536
}
537
537
538
538
if err != nil {
@@ -785,7 +785,7 @@ func NewContext() {
785
785
}
786
786
LFS .ContentPath = sec .Key ("LFS_CONTENT_PATH" ).MustString (filepath .Join (AppDataPath , "lfs" ))
787
787
if ! filepath .IsAbs (LFS .ContentPath ) {
788
- LFS .ContentPath = filepath .Join (workDir , LFS .ContentPath )
788
+ LFS .ContentPath = filepath .Join (AppWorkPath , LFS .ContentPath )
789
789
}
790
790
791
791
if LFS .StartServer {
You can’t perform that action at this time.
0 commit comments