cscli: fix bug in restore command (#510)
This commit is contained in:
parent
339cb6cce7
commit
a9353e3016
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ func restoreConfigFromDirectory(dirPath string) error {
|
|||
backupMain := fmt.Sprintf("%s/config.yaml", dirPath)
|
||||
if _, err = os.Stat(backupMain); err == nil {
|
||||
if csConfig.ConfigPaths != nil && csConfig.ConfigPaths.ConfigDir != "" {
|
||||
if err = types.CopyFile(backupMain, csConfig.ConfigPaths.ConfigDir); err != nil {
|
||||
if err = types.CopyFile(backupMain, fmt.Sprintf("%s/config.yaml", csConfig.ConfigPaths.ConfigDir)); err != nil {
|
||||
return fmt.Errorf("failed copy %s to %s : %s", backupMain, csConfig.ConfigPaths.ConfigDir, err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue