mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-04-28 11:27:00 +00:00
Merge pull request #8602 from Lyndon-Li/change-udmrepo-config-to-tmp
Change udmrepo config file location to tmp
This commit is contained in:
1
changelogs/unreleased/8602-Lyndon-Li
Normal file
1
changelogs/unreleased/8602-Lyndon-Li
Normal file
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user