diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index a9f24c08..763e99ff 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -725,7 +725,7 @@ func archiveLegacyConfig() { l.Warnf("Cannot archive config:", err) return } - defer src.Close() + defer dst.Close() l.Infoln("Archiving config.xml") io.Copy(dst, src)