Skip to content

Commit

Permalink
fix sql in clean disk goroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Apr 18, 2018
1 parent 48898fb commit 157299c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cleandevice.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (s *Server) checkFid(fid int64) error {
for _, devid := range otherDevids {
otherDevidsString = append(otherDevidsString, strconv.FormatInt(devid, 10))
}
_, err = tx.Exec("delete from file_on where fid=? and devid in (" + strings.Join(otherDevidsString, ",") + ")")
_, err = tx.Exec("delete from file_on where fid=? and devid in ("+strings.Join(otherDevidsString, ",")+")", fid)
if err != nil {
return err
}
Expand Down

0 comments on commit 157299c

Please sign in to comment.