change udmrepo config file location to tmp
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>pull/8602/head
parent
46b8a31ef0
commit
e79dbb8d60
|
@ -0,0 +1 @@
|
|||
Fix issue #8067, add tmp folder (/tmp for linux, C:\Windows\Temp for Windows) as an alternative of udmrepo's config file location
|
|
@ -200,7 +200,12 @@ func GetRepoDomain() string {
|
|||
|
||||
func getRepoConfigFile(workPath string, repoID string) string {
|
||||
if workPath == "" {
|
||||
workPath = filepath.Join(os.Getenv("HOME"), "udmrepo")
|
||||
home := os.Getenv("HOME")
|
||||
if home != "" {
|
||||
workPath = filepath.Join(home, "udmrepo")
|
||||
} else {
|
||||
workPath = filepath.Join(os.TempDir(), "udmrepo")
|
||||
}
|
||||
}
|
||||
|
||||
name := "repo-" + strings.ToLower(repoID) + ".conf"
|
||||
|
|
Loading…
Reference in New Issue