Procházet zdrojové kódy

Clean repository ROOT directory name with filepath.Clean (#2846)

For better compatibility with Windows.
tags/v1.3.0-rc1
Mike Fellows před 6 roky
rodič
revize
be523152a8
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2
    2
      modules/setting/setting.go

+ 2
- 2
modules/setting/setting.go Zobrazit soubor

@@ -971,9 +971,9 @@ func NewContext() {
RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gitea-repositories"))
forcePathSeparator(RepoRootPath)
if !filepath.IsAbs(RepoRootPath) {
RepoRootPath = path.Join(AppWorkPath, RepoRootPath)
RepoRootPath = filepath.Join(AppWorkPath, RepoRootPath)
} else {
RepoRootPath = path.Clean(RepoRootPath)
RepoRootPath = filepath.Clean(RepoRootPath)
}
ScriptType = sec.Key("SCRIPT_TYPE").MustString("bash")
if err = Cfg.Section("repository").MapTo(&Repository); err != nil {

Načítá se…
Zrušit
Uložit