Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spikeekips/51fabda7e78b36d51570ad9ac39b97c2 to your computer and use it in GitHub Desktop.
Save spikeekips/51fabda7e78b36d51570ad9ac39b97c2 to your computer and use it in GitHub Desktop.
diff --git isaac/block/localfs_writer.go isaac/block/localfs_writer.go
index 9bdfa2b9..d963da88 100644
--- isaac/block/localfs_writer.go
+++ isaac/block/localfs_writer.go
@@ -146,6 +146,7 @@ func (w *LocalFSWriter) SetOperationsTree(ctx context.Context, tw *fixedtree.Wri
func(ctx context.Context, _ uint64) error {
_ = w.opsf.Close()
+ if l := atomic.LoadUint64(&w.lenops); l > 0 {
if err := w.m.SetItem(NewLocalBlockMapItem(
base.BlockMapItemTypeOperations,
w.opsf.Checksum(),
@@ -153,6 +154,7 @@ func (w *LocalFSWriter) SetOperationsTree(ctx context.Context, tw *fixedtree.Wri
)); err != nil {
return errors.Wrap(err, "set operations")
}
+ }
return nil
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment