fix: 解决快照恢复时校验 daemon.json 路径失败的问题 (#4205)

Refs #4206
This commit is contained in:
ssongliu 2024-03-16 10:12:06 +08:00 committed by GitHub
parent 29d5d82fa5
commit 7784ee9575
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -215,7 +215,7 @@ func recoverAppData(src string) error {
func recoverDaemonJson(src string, fileOp files.FileOp) error {
daemonJsonPath := "/etc/docker/daemon.json"
_, errSrc := os.Stat(src)
_, errSrc := os.Stat(path.Join(src, "docker/daemon.json"))
_, errPath := os.Stat(daemonJsonPath)
if os.IsNotExist(errSrc) && os.IsNotExist(errPath) {
global.LOG.Debug("the daemon.json file does not exist, nothing happens.")