Explorar o código

restore: fix incorrect existence checking of "repositories.zip" (#6914)

4e4o %!s(int64=2) %!d(string=hai) anos
pai
achega
f2c3027f50
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      internal/cmd/restore.go

+ 1 - 1
internal/cmd/restore.go

@@ -154,7 +154,7 @@ func runRestore(c *cli.Context) error {
 
 	// Repositories
 	reposPath := filepath.Join(archivePath, "repositories.zip")
-	if !c.Bool("exclude-repos") && !c.Bool("database-only") && osutil.IsDir(reposPath) {
+	if !c.Bool("exclude-repos") && !c.Bool("database-only") && osutil.IsFile(reposPath) {
 		if err := zip.ExtractTo(reposPath, filepath.Dir(conf.Repository.Root)); err != nil {
 			log.Fatal("Failed to extract 'repositories.zip': %v", err)
 		}