mirror of
https://github.com/gogs/gogs.git
synced 2026-02-06 22:49:22 +01:00
restore: fix incorrect existence checking of "repositories.zip" (#6914)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user