diff --git a/src/db/boltstore/bolt_store.go b/src/db/boltstore/bolt_store.go index 42339e6..f31eec5 100644 --- a/src/db/boltstore/bolt_store.go +++ b/src/db/boltstore/bolt_store.go @@ -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