aboutsummaryrefslogtreecommitdiff
path: root/internal/cmd
diff options
context:
space:
mode:
author4e4o <sks_f@mail.ru>2022-04-27 09:32:13 +0700
committerGitHub <noreply@github.com>2022-04-27 10:32:13 +0800
commitf2c3027f50a1fc0a0603f504476c02eb5c820177 (patch)
treecd87de7b75c8ab17a4120222d95ab5f775312021 /internal/cmd
parent39adf6e55af11d5f76781c90a2226c40809dd120 (diff)
restore: fix incorrect existence checking of "repositories.zip" (#6914)
Diffstat (limited to 'internal/cmd')
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/cmd/restore.go b/internal/cmd/restore.go
index 4c4b1661..dfa2bfc1 100644
--- a/internal/cmd/restore.go
+++ b/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)
}