fix(bolt_store): use existing uploading info instead returing error
This commit is contained in:
parent
406f908d9e
commit
3c2cc79b05
1 changed files with 3 additions and 4 deletions
|
@ -100,11 +100,10 @@ func (bs *BoltStore) setUploadInfo(tx *bolt.Tx, userID uint64, uploadPath string
|
|||
}
|
||||
}
|
||||
|
||||
existingInfo := uploadInfoBucket.Get([]byte(uploadPath))
|
||||
if existingInfo != nil && !overWrite {
|
||||
return db.ErrCreateExisting
|
||||
existingInfoBytes := uploadInfoBucket.Get([]byte(uploadPath))
|
||||
if existingInfoBytes != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
uploadInfoBytes, err := json.Marshal(uploadInfo)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue