Merge pull request #7363 from filecoin-project/nonsense/fix-filepath-join
fix staging area path buildup
This commit is contained in:
commit
fe56995244
@ -70,7 +70,10 @@ import (
|
|||||||
"github.com/filecoin-project/lotus/storage"
|
"github.com/filecoin-project/lotus/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
var StorageCounterDSPrefix = "/storage/nextid"
|
var (
|
||||||
|
StorageCounterDSPrefix = "/storage/nextid"
|
||||||
|
StagingAreaDirName = "deal-staging"
|
||||||
|
)
|
||||||
|
|
||||||
func minerAddrFromDS(ds dtypes.MetadataDS) (address.Address, error) {
|
func minerAddrFromDS(ds dtypes.MetadataDS) (address.Address, error) {
|
||||||
maddrb, err := ds.Get(datastore.NewKey("miner-address"))
|
maddrb, err := ds.Get(datastore.NewKey("miner-address"))
|
||||||
@ -536,7 +539,8 @@ func BasicDealFilter(cfg config.DealmakingConfig, user dtypes.StorageDealFilter)
|
|||||||
return false, "miner error", err
|
return false, "miner error", err
|
||||||
}
|
}
|
||||||
|
|
||||||
diskUsageBytes, err := r.DiskUsage(r.Path() + "/deal-staging")
|
dir := filepath.Join(r.Path(), StagingAreaDirName)
|
||||||
|
diskUsageBytes, err := r.DiskUsage(dir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, "miner error", err
|
return false, "miner error", err
|
||||||
}
|
}
|
||||||
@ -574,7 +578,7 @@ func StorageProvider(minerAddress dtypes.MinerAddress,
|
|||||||
) (storagemarket.StorageProvider, error) {
|
) (storagemarket.StorageProvider, error) {
|
||||||
net := smnet.NewFromLibp2pHost(h)
|
net := smnet.NewFromLibp2pHost(h)
|
||||||
|
|
||||||
dir := filepath.Join(r.Path(), "deal-staging")
|
dir := filepath.Join(r.Path(), StagingAreaDirName)
|
||||||
|
|
||||||
// migrate temporary files that were created directly under the repo, by
|
// migrate temporary files that were created directly under the repo, by
|
||||||
// moving them to the new directory and symlinking them.
|
// moving them to the new directory and symlinking them.
|
||||||
|
Loading…
Reference in New Issue
Block a user