diff options
Diffstat (limited to 'cmd/dump.go')
-rw-r--r-- | cmd/dump.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/dump.go b/cmd/dump.go index c879d2fbe..c802849f8 100644 --- a/cmd/dump.go +++ b/cmd/dump.go @@ -272,13 +272,14 @@ func runDump(ctx *cli.Context) error { fatal("Failed to create tmp file: %v", err) } defer func() { + _ = dbDump.Close() if err := util.Remove(dbDump.Name()); err != nil { log.Warn("Unable to remove temporary file: %s: Error: %v", dbDump.Name(), err) } }() targetDBType := ctx.String("database") - if len(targetDBType) > 0 && targetDBType != setting.Database.Type { + if len(targetDBType) > 0 && targetDBType != setting.Database.Type.String() { log.Info("Dumping database %s => %s...", setting.Database.Type, targetDBType) } else { log.Info("Dumping database...") |