Skip to content

Commit

Permalink
Fix Copy error signaling
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasinsaurralde committed Jan 11, 2022
1 parent b7cbd9a commit d889095
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd_generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,14 +564,14 @@ func (m *Miniredis) cmdCopy(c *server.Peer, cmd string, args []string) {
db := m.db(ctx.selectedDB)

if !db.exists(from) {
c.WriteError(msgKeyNotFound)
c.WriteInt(0)
return
}

if !db.copy(from, to) {
c.WriteInt(1)
c.WriteInt(0)
return
}
c.WriteInt(0)
c.WriteInt(1)
})
}

0 comments on commit d889095

Please sign in to comment.