Commit 42d67726 authored by Łukasz Magiera's avatar Łukasz Magiera
Browse files

Create cache dir later

parent 6b57024f
......@@ -169,9 +169,6 @@ func (sb *SectorBuilder) SealPreCommit(ctx context.Context, sectorID uint64, tic
if err != nil {
return RawSealPreCommitOutput{}, xerrors.Errorf("getting cache dir: %w", err)
}
if err := os.Mkdir(string(cacheDir), 0755); err != nil {
return RawSealPreCommitOutput{}, err
}
sealedPath, err := sfs.ForceAllocSector(fs.DataSealed, sb.Miner, sb.ssize, true, sectorID)
if err != nil {
......@@ -240,6 +237,10 @@ func (sb *SectorBuilder) SealPreCommit(ctx context.Context, sectorID uint64, tic
return RawSealPreCommitOutput{}, err
}
if err := os.Mkdir(string(cacheDir), 0755); err != nil {
return RawSealPreCommitOutput{}, err
}
var sum uint64
for _, piece := range pieces {
sum += piece.Size
......
Markdown is supported
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