Commit dc640452 authored by Akshay Bharambe's avatar Akshay Bharambe
Browse files

Fix: got length of cyphertext is less than 0 error on empty file read

1. Fix: got length of cyphertext is less than 0 error on empty file read.
parent de1b2cc6
Branches
Tags
2 merge requests!159Mep release 060220,!157Add: Lazywriter support for Normal and append bucket
Showing with 5 additions and 1 deletion
......@@ -387,6 +387,10 @@ func readNormalFileUsingFp(fp *os.File, rs *gjson.Result, secParams securitymdl.
return nil, err
}
if len(ba) == 0 {
return ba, nil
}
if secParams.EnableSecurity {
// _, fileName := filepath.Split(fp.Name())
key, err := securitymdl.GenSecKeyBytes(fp.Name(), rs)
......@@ -613,7 +617,7 @@ func saveDatInLazyBucket(bucket *Bucket, fp *os.File, data *gjson.Result, secPar
Identifier: fp.Name(),
InterfaceData: "",
SaveFn: func() lazywriter.SaveDataFn {
if bucket.BucketType == BucketTypeSimple {
if bucket.BucketType == BucketTypeAppend {
return lazyCallBackFn
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment