Browse Source

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

4e4o 2 years ago
parent
commit
f2c3027f50
1 changed files with 1 additions and 1 deletions
  1. 1 1
      internal/cmd/restore.go

+ 1 - 1
internal/cmd/restore.go

@@ -154,7 +154,7 @@ func runRestore(c *cli.Context) error {
 
 
 	// Repositories
 	// Repositories
 	reposPath := filepath.Join(archivePath, "repositories.zip")
 	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 {
 		if err := zip.ExtractTo(reposPath, filepath.Dir(conf.Repository.Root)); err != nil {
 			log.Fatal("Failed to extract 'repositories.zip': %v", err)
 			log.Fatal("Failed to extract 'repositories.zip': %v", err)
 		}
 		}